mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add setpoint events according to divetype
When changing to a CCR dive, add a setpoint change to the default setpoint at the beginning of the dive. Otherwise add an explicit setpoint change to 0 . Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a478eb5711
commit
0f7f2195d5
3 changed files with 11 additions and 6 deletions
6
dive.c
6
dive.c
|
|
@ -888,8 +888,10 @@ void update_setpoint_events(struct divecomputer *dc)
|
|||
}
|
||||
ev = get_next_event(ev->next, "SP change");
|
||||
}
|
||||
if (!changed)
|
||||
add_event(dc, 0, SAMPLE_EVENT_PO2, 0, new_setpoint, "SP change");
|
||||
if (!changed) {
|
||||
if (!add_event(dc, 0, SAMPLE_EVENT_PO2, 0, new_setpoint, "SP change"))
|
||||
printf("Could not add setpoint change event\n");
|
||||
}
|
||||
}
|
||||
|
||||
void sanitize_gasmix(struct gasmix *mix)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue