mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d031b54d16
commit
58b668c714
3 changed files with 11 additions and 2 deletions
2
dive.h
2
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue