summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-10-11 16:39:40 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-11 20:26:28 -0700
commit58b668c714223bf7ab1164f27353fb49a38ada40 (patch)
tree1323e0115a2805dba6da3147258965f7abf2f140 /dive.h
parentd031b54d16e74becd3a5b320c5cbed62a66c9d57 (diff)
downloadsubsurface-58b668c714223bf7ab1164f27353fb49a38ada40.tar.gz
Fix dive planner sidebar depth units
The dive planner always showed the depth in our internal units, ie millimeter, in the sidebar that showed the plan points. That made little sense in metric mode, and none at all in imperial. The _graph_ showed things in meter and feet. So make the DivePlannerPointsModel always convert things to and from the user units. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index aec59f6f9..fd9431a30 100644
--- a/dive.h
+++ b/dive.h
@@ -185,6 +185,8 @@ 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);
+extern unsigned int units_to_depth(double depth);
+
static inline double grams_to_lbs(int grams)
{
return grams / 453.6;