mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Make is_gas_used work with SAMPLE_EVENT_GASCHANGE
SAMPLE_EVENT_GASCHANGE only contains o2 part, and not the he part so when looking at ex the gaslist for dives/test20.xml it got it realy wrong. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3e2faa4239
commit
9cbd0febbc
1 changed files with 5 additions and 1 deletions
|
@ -318,7 +318,11 @@ bool is_gas_used(struct dive *dive, int idx)
|
|||
if (is_air(o2, he)) {
|
||||
if (is_air(event_o2 * 10, event_he * 10))
|
||||
used = TRUE;
|
||||
} else if (he == event_he * 10 && o2 == event_o2 * 10) {
|
||||
} else if (event->type == 25 && he == event_he * 10 && o2 == event_o2 * 10) {
|
||||
/* SAMPLE_EVENT_GASCHANGE2(25) contains both o2 and he */
|
||||
used = TRUE;
|
||||
} else if (o2 == event_o2 * 10) {
|
||||
/* SAMPLE_EVENT_GASCHANGE(11) only contains o2 */
|
||||
used = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue