mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Treat gaschanges at 1s as inital gas use
When the first leg in the planner is not cylinder 0, a gaschange event at t=1s is inserted. In the profile, we should treat that as inital gas, so no pressure information is printed for cylinder 0 that is used nominally for one second. This fixes a problem reported by Willem. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
2516ae7e5f
commit
6518b0db45
1 changed files with 1 additions and 1 deletions
|
@ -893,7 +893,7 @@ int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc)
|
|||
{
|
||||
if (dc) {
|
||||
struct event *ev = get_next_event(dc->events, "gaschange");
|
||||
if (ev && dc->sample && ev->time.seconds == dc->sample[0].time.seconds)
|
||||
if (ev && ((dc->sample && ev->time.seconds == dc->sample[0].time.seconds) || ev->time.seconds <= 1))
|
||||
return get_cylinder_index(dive, ev);
|
||||
else if (dc->divemode == CCR)
|
||||
return MAX(get_cylinder_idx_by_use(dive, DILUENT), 0);
|
||||
|
|
Loading…
Reference in a new issue