Changeset 6518b0d in subsurface


Ignore:
Timestamp:
Feb 4, 2017, 7:09:35 AM (4 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
d4dbd0be
Parents:
2516ae7e
git-author:
Robert C. Helling <helling@…> (02/04/17 05:26:04)
git-committer:
Dirk Hohndel <dirk@…> (02/04/17 07:09:35)
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/dive.c

    r8a8315d r6518b0d  
    894894        if (dc) {
    895895                struct event *ev = get_next_event(dc->events, "gaschange");
    896                 if (ev && dc->sample && ev->time.seconds == dc->sample[0].time.seconds)
     896                if (ev && ((dc->sample && ev->time.seconds == dc->sample[0].time.seconds) || ev->time.seconds <= 1))
    897897                        return get_cylinder_index(dive, ev);
    898898                else if (dc->divemode == CCR)
Note: See TracChangeset for help on using the changeset viewer.