diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-11-04 10:57:26 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-11-04 10:57:26 -0700 |
commit | 0e64a22c142bbb2415b010968194948c592b1542 (patch) | |
tree | 9b8dc9069cd49b16d3466fb31379bce712ead5a6 | |
parent | ef7771ebf247bb5b5e4fe909ae03d55c201c89e0 (diff) | |
download | subsurface-0e64a22c142bbb2415b010968194948c592b1542.tar.gz |
Don't display a water temperature of absolute 0 in info/stats page
Found using the new test dives
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | statistics.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/statistics.c b/statistics.c index 8000309c3..80cab2b02 100644 --- a/statistics.c +++ b/statistics.c @@ -140,8 +140,11 @@ void show_dive_stats(struct dive *dive) set_label(info_stat_w.max_depth, "%.*f %s", decimals, value, unit); value = get_depth_units(dive->meandepth.mm, &decimals, &unit); set_label(info_stat_w.avg_depth, "%.*f %s", decimals, value, unit); - value = get_temp_units(dive->watertemp.mkelvin, &unit); - set_label(info_stat_w.water_temp, "%.1f %s", value, unit); + if (dive->watertemp.mkelvin > 200) { + value = get_temp_units(dive->watertemp.mkelvin, &unit); + set_label(info_stat_w.water_temp, "%.1f %s", value, unit); + } else + set_label(info_stat_w.water_temp, ""); value = get_volume_units(dive->sac, &decimals, &unit); if (value > 0) { set_label(info_stat_w.sac, "%.*f %s/min", decimals, value, unit); |