summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2013-10-04 07:57:48 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-04 09:16:39 -0700
commitc28fe00bfe7b0ed747050afc97812a56ccc8a291 (patch)
treedecfc381de4823d5744b8b978c29c732e0ea2c75 /dive.h
parent6ae6c768f30d2d377292f0ea3ff050dfd7cb52ca (diff)
downloadsubsurface-c28fe00bfe7b0ed747050afc97812a56ccc8a291.tar.gz
Added configuration options for vertical speed units.
Some people (free divers) are loving ft/s or m/s units for vertical speeds. Now they can choose between /min or /s in the configuration (only Qt UI). Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/dive.h b/dive.h
index dbfaf7202..9fb47f21a 100644
--- a/dive.h
+++ b/dive.h
@@ -160,6 +160,7 @@ extern double get_depth_units(unsigned int mm, int *frac, const char **units);
extern double get_volume_units(unsigned int ml, int *frac, const char **units);
extern double get_temp_units(unsigned int mk, const char **units);
extern double get_weight_units(unsigned int grams, int *frac, const char **units);
+extern double get_vertical_speed_units(unsigned int mms, int *frac, const char **units);
static inline double grams_to_lbs(int grams)
{
@@ -476,6 +477,7 @@ struct units {
enum { BAR, PSI, PASCAL } pressure;
enum { CELSIUS, FAHRENHEIT, KELVIN } temperature;
enum { KG, LBS } weight;
+ enum { SECONDS, MINUTES } vertical_speed_time;
};
/*
@@ -490,7 +492,8 @@ struct units {
.volume = LITER, \
.pressure = BAR, \
.temperature = CELSIUS, \
- .weight = KG \
+ .weight = KG, \
+ .vertical_speed_time = MINUTES \
}
#define IMPERIAL_UNITS { \
@@ -498,7 +501,8 @@ struct units {
.volume = CUFT, \
.pressure = PSI, \
.temperature = FAHRENHEIT, \
- .weight = LBS \
+ .weight = LBS, \
+ .vertical_speed_time = MINUTES \
}
extern const struct units SI_units, IMPERIAL_units;
extern struct units xml_parsing_units;