diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-11-01 20:13:14 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-11-01 20:13:14 -0700 |
commit | b26ca781b87371e77b851298093b0a7136be64fa (patch) | |
tree | 287bc1a886661a5bf6f2eb49c778d40347edb36a /dive.h | |
parent | a487f6c9314f0fe5e4173b670d9653067285da21 (diff) | |
download | subsurface-b26ca781b87371e77b851298093b0a7136be64fa.tar.gz |
Use unit functions to get column headers, add unit function for pressure
Finally getting more consistent overall in how we convert between the
different units and how we decide which units to display.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -86,6 +86,7 @@ typedef struct { pressure_t start, end; } cylinder_t; +extern int get_pressure_units(unsigned int mb, const char **units); extern double get_depth_units(unsigned int mm, int *frac, const char **units); extern double get_volume_units(unsigned int mm, int *frac, const char **units); extern double get_temp_units(unsigned int mm, const char **units); @@ -146,6 +147,12 @@ static inline double to_ATM(pressure_t pressure) return pressure.mbar / 1013.25; } +static inline int mbar_to_PSI(int mbar) +{ + pressure_t p = {mbar}; + return to_PSI(p); +} + struct sample { duration_t time; depth_t depth; |