diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-09-14 06:43:12 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-14 07:33:55 +0200 |
commit | a8ce78bf775d9debef05ea697da240e85a7c8e80 (patch) | |
tree | 7568c3742122d3b5a684d823e7e9f25eb9bf1cae /core/statistics.c | |
parent | 96ed09bf145a5e108ca8098a1a5814784bcbebd2 (diff) | |
download | subsurface-a8ce78bf775d9debef05ea697da240e85a7c8e80.tar.gz |
Refine cylinder usage tests
Consider cylinder used also if the first and last sample pressure differ
enough
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/statistics.c')
-rw-r--r-- | core/statistics.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/statistics.c b/core/statistics.c index 4ce110d07..6ed859ca2 100644 --- a/core/statistics.c +++ b/core/statistics.c @@ -334,6 +334,10 @@ bool is_cylinder_used(struct dive *dive, int idx) if ((dive->cylinder[idx].start.mbar - dive->cylinder[idx].end.mbar) > SOME_GAS) return true; + + if ((dive->cylinder[idx].sample_start.mbar - dive->cylinder[idx].sample_end.mbar) > SOME_GAS) + return true; + for_each_dc(dive, dc) { if (has_gaschange_event(dive, dc, idx)) return true; |