[PATCH 0/2] Show cylinder sizes properly
Linus Torvalds
torvalds at linux-foundation.org
Wed Feb 24 15:00:41 PST 2016
This is a seprate series of patches (it's on top of my first series in my
tree, but I think it would apply independently) that came out of me
looking at our cylinder size handling.
In particular, it came out of me noticing:
"If you pick an existing type without work-pressure (eg a 10 l metric
bottle), it shows that "10 l" wet-size in cubic feet (0.35 cuft). It
should show it as 10 l because we don't have a workpressure, and we
just cannot convert to cuft at all"
and the first patch here fixes that issue.
The second patch is kind of a trial balloon, and shouldn't necessarily be
taken seriously. What is does is to show *both* the nominal imperial size
_and_ the "actual" size of an imperial cylinder. So if you have an AL80,
it will now show up as havign the size "80 (77)cuft", where that 77 is our
(approximate!) correction for the incompressibility of air.
I'm not sure it's actually a good idea, but with the first patch done for
other reasons, it becomes trivial to show cylinder sizes in any random
format, since it's not tied to that "get_volume_string()" that is used for
other things too.
So I think the first patch is a good idea (although somebody should check
whether we want to translate the liter and the cubic feet units). The
second one is not really serious, and meant more as a "maybe we could talk
about something like this" trial balloon.
Linus Torvalds (2):
Don't use "get_volume_string()" for cylinder size string
Show both the nominal and real size for an imperial cylinder
qt-models/cylindermodel.cpp | 29 +++++++++++++++++++++-
subsurface-core/helpers.h | 2 +-
subsurface-core/qthelper.cpp | 10 +-------
subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 2 +-
4 files changed, 31 insertions(+), 12 deletions(-)
--
2.7.2.334.g7c0da37
More information about the subsurface
mailing list