Real support for multiple concurrent sensors..

Linus Torvalds torvalds at linux-foundation.org
Thu Jul 27 10:22:17 PDT 2017


On Thu, Jul 27, 2017 at 1:59 AM, Robert Helling <helling at atdotde.de> wrote:
>
> do I understand you correctly that with multiple sensors, we would give up
> to try to determine which gas the diver is breathing (at a given time)?

No, we can definitely do it, it's just that the C++ model that does it
right now is not doing it right.

It abstracts things away the wrong way.

The information about the primary active cylinder is still there, it's
just that it isn't in the pressure samples any more, because we can
have many pressure samples. It's still there in the gas change
information, though.

The problem really is that the TankItem model has saved all the wrong
things. For example, instead of just saving the displayed dive (like
everything else does), it copies the current set of cylinders. Which
is pointless - if it had just saved the current dive and dive
computer, it would have had the cylinders through that.

So the TankItem class actually does extra work in order to throw
useful data away. Which is why I refuse to touch that code.

               Linus


More information about the subsurface mailing list