Patches ( 4 )

Linus Torvalds torvalds at linux-foundation.org
Thu Jul 18 11:55:06 PDT 2013


On Thu, Jul 18, 2013 at 11:06 AM, Tomaz Canabrava <tcanabrava at kde.org> wrote:
>
>
> Linus, this should now be fixed, same branch. <3
> When you have time, can you check?

Yup, cylinder type editing seems to work fine now.

> I also spotted a few bugs on editing:
>
> - oxygen = clears, and doesn't save what you entered.
> - helium too
> - weigthsystems are always '0.0grams'
>
> trying to fix those now.

The weightsystem editing was actually pretty bad even in the gtk
version. The problem with weightsystems is that we don't allow any
sane way to specify the units, and we force the units to the user
preferences.

Which can be problematic for other things too, but is *usually* not noticeable.

For example, assuming you dive with your own basic equipment (and most
divers that are serious enough to log dives in subsurface do - we
don't really even support non-computer diving except as an
after-thought), things like cylinder pressure will already be in the
units you're used to. So you *seldom* have the issue that you have
your units set to PSI, but you have the actual values in bar, for
example. If you use imperial settings, then you'll have imperial
values.

However, the same is *not* necessarily usually true of cylinders and
weights. Unless you dive locally, normally you will not be using your
own weights and cylinders. So even if you want to see things in
metric, when you are diving in the US (say Hawaii), you *will* be
using imperial weights. And you likely *will* be using an AL80, not a
12L cylinder.

For cylinders, we actually do this quite well. Regardless of whether
the units are set to imperial or metric, it's easy to specity "12l" or
"AL80".

For weightsystem editing, we suck. If you have set your units to
metric, and you were diving with 12 lbs of weight, you need to say
"oh, that's approximately 5kg". And you'll be off by a lot. Maybe
you'd say "5.5kg" and be closer. You can have the same confusion in
reverse.

(In fact, it can be *so* confusing that you may not even know what
you're diving. Metric places that get a lot of US divers may talk
about "pounds" when it's really a half-kilo weight, but they *might*
actually be in pounds. I've hear the term "metric pound" for a
half-kilo. Oh well).

That sucks. And it sucked in the gtk version too, so this is
fundamentally difficult. I suspect we should allow input with explicit
units, so that even if you are 100% metric, when you dive in the US
you can say "I had 12 lbs of weight", and we'll just convert it to
5.44..kg. Or maybe we'll even notice "oh, that's a round number in
lbs, and show it as such". I dunno.

That's a separate issue, though. I'll try to get to it myself if you
don't get around to it, I just thought I'd mention it. I never got
around to it in the gtk version, though.

              Linus


More information about the subsurface mailing list