[PATCH 6/4] Fix another cylinder pressure plotting special case

Linus Torvalds torvalds at linux-foundation.org
Sun Jul 30 21:25:18 PDT 2017


On Sun, Jul 30, 2017 at 4:41 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>
>>  - if the cylinder is "used", it is always shown (so gas pressure has
>> changed, or we have gas switch events to it, or it's the first gas and
>> we had no switches away from it or whatever)
>
> OK
>
>>  - if the cylinder has no data at all, we don't show it
>
> But "no data at all" does not include "first and only cylinder", right?

Right. The "cylinder is used" case actually includes the first
cylinder, if it's the only one. The code in "has_gaschange_event()" at
the end (if there are no actual explicit gas changes or CCR O2/diluent
markers) does:

        return !first_gas_explicit && idx == 0;

which means that we return true if it's the first cylinder, and no
other cylinder was explicitly marked as the first cylinder.

> someone has a simple dive computer with only one gas, so no gas switches,
> but also no pressure data, and because of "air" we have no values for
> O2/He, either - that still is shown, correct?

Yes. Unless I screwed up. But this is not new code, this code caught
that first cylinder before too.

> Can you send this as "7/4" in your current series? Signed off with a
> commit message?

Well, it ended up as "8/4" instead, because "7/4" was the other issue
that Robert Helling triggered.

Both of those just sent. And you still have that 6/4 (that started
this thread) in your queue somewhere.

              Linus


More information about the subsurface mailing list