mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
When looking for gas change events only use those
This function looks for the last gas change before a given time. We should initialize it with a gaschange event as we might later use this event to read a gasmix from it. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
a0b80ca775
commit
d75f7474c7
1 changed files with 1 additions and 1 deletions
|
@ -960,7 +960,7 @@ static inline struct gasmix *get_gasmix(struct dive *dive, struct divecomputer *
|
|||
if (!gasmix) {
|
||||
int cyl = explicit_first_cylinder(dive, dc);
|
||||
gasmix = &dive->cylinder[cyl].gasmix;
|
||||
ev = dc ? dc->events : NULL;
|
||||
ev = dc ? get_next_event(dc->events, "gaschange") : NULL;
|
||||
}
|
||||
while (ev && ev->time.seconds < time) {
|
||||
gasmix = get_gasmix_from_event(dive, ev);
|
||||
|
|
Loading…
Add table
Reference in a new issue