summaryrefslogtreecommitdiffstats
path: root/core/units.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-06 13:44:22 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-06 13:49:36 -0700
commit876b479d695acda652e7b6c81c6b899946d42a85 (patch)
treecc01ab6c306c94e0d542fd43000d11f62e056cd8 /core/units.h
parent38b9185974e4f5199ee8f65bac97dab76b058e41 (diff)
downloadsubsurface-876b479d695acda652e7b6c81c6b899946d42a85.tar.gz
Wire up duration units preference UI
Now we track the preference, but we don't act on it, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/units.h')
-rw-r--r--core/units.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/core/units.h b/core/units.h
index c92c23d3a..7e4c2e7d2 100644
--- a/core/units.h
+++ b/core/units.h
@@ -255,6 +255,11 @@ struct units {
SECONDS,
MINUTES
} vertical_speed_time;
+ enum DURATION {
+ MIXED,
+ MINUTES_ONLY,
+ ALWAYS_HOURS
+ } duration_units;
};
/*
@@ -264,15 +269,17 @@ struct units {
* actually use. Similarly, C instead of Kelvin.
* And kg instead of g.
*/
-#define SI_UNITS \
- { \
- .length = METERS, .volume = LITER, .pressure = BAR, .temperature = CELSIUS, .weight = KG, .vertical_speed_time = MINUTES \
- }
-
-#define IMPERIAL_UNITS \
- { \
- .length = FEET, .volume = CUFT, .pressure = PSI, .temperature = FAHRENHEIT, .weight = LBS, .vertical_speed_time = MINUTES \
- }
+#define SI_UNITS \
+ { \
+ .length = METERS, .volume = LITER, .pressure = BAR, .temperature = CELSIUS, .weight = KG, \
+ .vertical_speed_time = MINUTES, .duration_units = MIXED \
+ }
+
+#define IMPERIAL_UNITS \
+ { \
+ .length = FEET, .volume = CUFT, .pressure = PSI, .temperature = FAHRENHEIT, .weight = LBS, \
+ .vertical_speed_time = MINUTES, .duration_units = MIXED \
+ }
#ifdef __cplusplus
}