]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Handle 'gas change' events correctly
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 23 Oct 2011 14:52:45 +0000 (17:52 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 23 Oct 2011 15:01:30 +0000 (18:01 +0300)
Dirk wrote the multi-cylinder support assuming that the dive computer
always gives the selected cylinder index in the sample data - that's
what his Uemis does, and it makes sense for any dive computer that
supports multiple pressure transmitters.

However, the other case is a dive computer where the pressure samples
are all from cylinder 0, and any other cylinder will have the starting
and ending pressure set by hand.  And the gas change events show when
the cylinder change happened.

So this creates a "turn gas change events into pressure sample fixups"
phase just before we actually analyze the pressures.  That way the
pressure analysis can alway sdo the right thing, regardless of how the
data was originally stores in the dive.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found