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>
This commit is contained in:
parent
96ed09bf14
commit
a8ce78bf77
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user