diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-11 16:39:40 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-11 20:26:28 -0700 |
commit | 58b668c714223bf7ab1164f27353fb49a38ada40 (patch) | |
tree | 1323e0115a2805dba6da3147258965f7abf2f140 /dive.h | |
parent | d031b54d16e74becd3a5b320c5cbed62a66c9d57 (diff) | |
download | subsurface-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |