diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-30 21:09:24 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-30 21:28:38 -0700 |
commit | 2fa66f7ab1fc53fc0d4482a53723f81fadd82809 (patch) | |
tree | 3298bceb75d8f997d9efa8bed1de650b611b812c /packaging/windows/mxe-based-build.sh | |
parent | 56c206d19fba315a633404e54c16891db49a97ac (diff) | |
download | subsurface-2fa66f7ab1fc53fc0d4482a53723f81fadd82809.tar.gz |
Tweak the "display_unused_tanks" preferences logic
This is really unrelated to my recent "multiple gas pressures" work, but
the test case from Gaetan Bisson showed that the logic for which
cylinders to show in the equipment tab was less than optimal.
We basically used to show only cylinders that were actively used, unless
you had the "display_unused_tanks" preference option set. That comes
from some dive computers reporting a *lot* of cylinders that the diver
really doesn't even have with him on the dive. And showing those extra
dummy cylinders gets pretty annoying after a time, which is why we
default to not showing unused tanks.
However, in Gaetan's case, he had a total of four cylinders on the dive:
the O2 and diluent bottle for the rebreather dive, and then bailout
bottles (both air and deco). And while the bailout bottles weren't
actually used, Gaetan had actually filled in all the pressure details
etc for them, and so you'd really expect them to show up. These were
*not* just some extraneous default cylinder filled in by an over-eager
dive computer.
But because the bailout wasn't used, the manual pressures at the end
were the same as at the beginning, and the "unused cylinder" logic
triggered anyway.
So tweak the logic a bit, and say that you show cylinder equipment not
only if it has been used on the dive, but also if it has any pressure
information for it.
So the o nly cylinders we don't show are the ones that really have no
interesting information at all, except for possibly the cylinder tank
type itself (which is exactly what the over-eager dive computer case
might fill in, usually in the form of a default cylinder type).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/windows/mxe-based-build.sh')
0 files changed, 0 insertions, 0 deletions