Few bugs and a feature req from testing Subsurface

Linus Torvalds torvalds at linux-foundation.org
Sat Mar 15 12:41:20 PDT 2014


On Sat, Mar 15, 2014 at 12:26 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> So here's what I'm proposing to fix the current implementation
>
> a) if no default cylinder is set, don't just use AL80. Disable the
> default cylinder logic
>
> b) if a default cylinder is set, ONLY use it for the first cylinder of a
> DC
>
> Linus, will this address your issues?

Yes, that works for me, and I think is more sensible. The whole
"default cylinder" concept doesn't really make sense if you carry
multiple cylinders, since even if you do have defaults, they would
likely not be a single default cylinder (ie a recreational diver might
have a tiny 3cuft spare-air thing (0.4l cylinder), and a tech diver
might have a default 40cuft (5.8l) deco bottle).

So I don't think it ever makes sense to fill in the default for all
cylinders, unless you make that default cylinder config option be a
_list_ of cylinders to be used by default.

>> Anyway, what we probably *should* do (after the two bugs above get
>> sorted out) is likely to say that when you delete a cylinder, you
>> delete all gas change events associated with it too. That would give
>> us a way to fix up the above issue by the user just saying "I really
>> only had the first cylinder, so delete that bogus second cylinder",
>> and everything would work out right. But right now, deleting that
>> second cylinder has bigger problems than "the gas change event
>> remains".
>
> I like this. When I understood what caused the odd situation Miika was
> seeing I was wondering what to do about it after the fact. This seems
> like a clean solution.

Well, there are issues with that model too, and there are more complex
cases that we simply don't handle well at all.

For example, a user might decide to "edit" a cylinder by deleting it
and creating a new one. That sounds like a bad idea ("don't do that
then"), but it's actually valid in some cases, notably if you want to
change the order of cylinders, so it's not *entirely* crazy. How would
we re-associate gases with dive computers and with pressure readings?

And with bad gasmix information (which isn't that uncommon, with
Miika's case as an example) _and_ multiple actual real cylinders, more
complex cases can happen.

I've fixed a few cases in my history by just editing things by hand.
And it's probably special enough that in the end that may be what we
have to have as a fallback. So the "delete cylinder" approach may work
for the really simple cases, but they are hopefully the only ones that
are common enough to worry about.

                  Linus


More information about the subsurface mailing list