diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-11-01 21:12:21 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-11-01 21:34:06 -0700 |
commit | 485b02937d8ca1f9a9043c89e74a3d2f15d6426b (patch) | |
tree | b589a44458c22dcbdeada5996eaf634cc064723e /divelist.c | |
parent | 56980579514f2900e43441b483e435b3e3235266 (diff) | |
download | subsurface-485b02937d8ca1f9a9043c89e74a3d2f15d6426b.tar.gz |
Even more places with pressure and volume conversions
Amazing at how many spots we are re-implementing the wheel.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/divelist.c b/divelist.c index acaf08d38..2d04eb5b0 100644 --- a/divelist.c +++ b/divelist.c @@ -223,7 +223,6 @@ static void sac_data_func(GtkTreeViewColumn *col, gpointer data) { int value; - const double liters_per_cuft = 28.317; const char *fmt; char buffer[16]; double sac; @@ -242,7 +241,7 @@ static void sac_data_func(GtkTreeViewColumn *col, break; case CUFT: fmt = "%4.2f"; - sac /= liters_per_cuft; + sac = ml_to_cuft(sac * 1000); break; } snprintf(buffer, sizeof(buffer), fmt, sac); @@ -307,7 +306,7 @@ static double calculate_airuse(struct dive *dive) if (!size) continue; - kilo_atm = (cyl->start.mbar - cyl->end.mbar) / 1013250.0; + kilo_atm = (to_ATM(cyl->start) - to_ATM(cyl->end)) / 1000.0; /* Liters of air at 1 atm == milliliters at 1k atm*/ airuse += kilo_atm * size; |