diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2015-06-20 15:04:05 +1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-22 17:24:56 -0700 |
commit | 26622e7e048caa952b697abee706a7936f94c39c (patch) | |
tree | f84fa4b5a200e6cf420464f3d328fee11c6a49ad /android.cpp | |
parent | 21c46b8c2d17fa03596d9334710d75d8cba44d8c (diff) | |
download | subsurface-26622e7e048caa952b697abee706a7936f94c39c.tar.gz |
Planner notes - revise logic for gasmix output
The logic for when to output a gasmix in the notes table is more
complicated than it seems at first.
- On a descent leg, the gas is the gas used for descent
- At a stop (calculated or user defined), the gas is the gas used for that
stop
- But on an ascent leg (if displayed), the gas is the gas that is ABOUT TO
BE USED
- The gas should not be repeated if it's the same gas as used on the last
row of the table
- Ascent legs should only be displayed if the display transitions option
is selected, OR if there is a gas change without a stop (the user can
now set a minimum duration for a gaschange, but zero is still allowed).
The existing code tries to track what gas is being used/switched to at
each waypoint, and whether the gas should be printed or postponed to the
next leg. It works sometimes but not always.
This patch replaces the postponed gas logic with:
- Is this an ascent leg? (determines whether the applicable gas is the
preceding or following leg, and whether the leg should be displayed at
all if the transitions option isn't selected)
- Is it an ascent with a gaschange without a stop?
- Has the gas actually changed from the last output?
- Will the next leg be at the same level and same gas (in which case merge
them)?
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'android.cpp')
0 files changed, 0 insertions, 0 deletions