diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-02 15:06:54 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-04 22:37:18 -0700 |
commit | e0824ef9f3e2a0cc0fae435b8e3560b309d9708e (patch) | |
tree | 4597890128bc8ebee2dfb4335dc5c9b855e4a68e /core/save-git.c | |
parent | 7a444c0210783b926c9f60dd7b436eb086e8f396 (diff) | |
download | subsurface-e0824ef9f3e2a0cc0fae435b8e3560b309d9708e.tar.gz |
Make gas change events always have a cylinder index
In commit df4e26c8757a ("Start sanitizing gaschange event information")
back about a year and a half ago, I started sanitizing the gas switch
event data, allowing gas switches to be associated with a particular
cylinder index rather than just the gas mix that is switched to.
But that initial step only _allowed_ a gas switch event to be associated
with a particular cylinder, the primary model was still to just specify
the mix.
This finally takes the next step, and *always* associates a gas switch
event with a particular cylinder. Instead of then looking up the
cylinder by trying to match gas mixes at runtime, subsurface now looks
it up when loading the dive initially as part of the dive fixup code.
The switch event still has an a separate gas mix associated with it, but
this patch also starts preparing for entirely relying on the gas mix in
the cylinder itself, by starting to pass in not just the event but also
the dive pointer to the routines that look up gas mix details.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/save-git.c')
-rw-r--r-- | core/save-git.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/save-git.c b/core/save-git.c index e22019ab0..ed91debf4 100644 --- a/core/save-git.c +++ b/core/save-git.c @@ -325,7 +325,7 @@ static void save_one_event(struct membuffer *b, struct event *ev) if (ev->gas.index >= 0) { show_index(b, ev->gas.index, "cylinder=", ""); put_gasmix(b, &ev->gas.mix); - } else if (!event_gasmix_redundant(ev)) + } else put_gasmix(b, &ev->gas.mix); } put_string(b, "\n"); |