summaryrefslogtreecommitdiffstats
path: root/statistics.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2011-12-09 19:27:01 +0200
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-12-09 09:49:04 -0800
commitfe532a585cb0c1250cca5994a78394aadc3e14dd (patch)
treec2feb706076be09a2159c7cfe56063d812e280d1 /statistics.c
parentc912e1fafbe9b025c334eb8b9a61e13bfcfdbfc9 (diff)
downloadsubsurface-fe532a585cb0c1250cca5994a78394aadc3e14dd.tar.gz
Show O2 per cent if given in cylinder info
O2 per cent from dive computer should be shown in Dive Info if one is given even without pressure information for the cylinder. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'statistics.c')
-rw-r--r--statistics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/statistics.c b/statistics.c
index 4c6379443..5cb242e90 100644
--- a/statistics.c
+++ b/statistics.c
@@ -172,7 +172,7 @@ void show_dive_stats(struct dive *dive)
/* we assume that every valid cylinder has either a working pressure
* or a size; but for good measure let's also accept cylinders with
* a starting or ending pressure*/
- if (cyl->type.workingpressure.mbar || cyl->type.size.mliter || start || end) {
+ if (cyl->type.workingpressure.mbar || cyl->type.size.mliter || cyl->gasmix.o2.permille || start || end) {
/* 0% O2 strangely means air, so 21% - I don't like that at all */
int o2 = cyl->gasmix.o2.permille ? : 209;
if (offset > 0) {