Jef Driesen a568c756a1 Fix the gas mix parsing for the Aladin Tec 2G.
Unlike the other models, the Aladin Tec 2G uses only a single byte to
store the oxygen percentage, and there is no need to manually re-map the
deco mix.

Normally, the oxygen percentage is stored using two bytes (little endian
byte order). Thus for a device supporting two gas mixes, four bytes will
be used, and the corresponding gas mix id for each byte is as follows:

  ID: 0 0 1 1

After re-mapping the id of the deco mix, this becomes:

  ID: 0 0 2 2

Since oxygen percentages are limited to the range 0-100%, the highest
byte (marked with an X) should always be zero and can thus be ignored:

  ID: 0 X 2 X

Now, because an oxygen percentage of zero indicates a disabled gas mix,
this is equivalent to a device supporting three (or even four) gas
mixes, each stored using only a single byte:

  ID: 0 1 2 3

We can take advantage of this knowledge to avoid having to re-map the
deco mix id.
2016-09-18 07:15:30 -07:00
..
2014-12-21 14:52:12 +01:00
2014-12-21 14:52:12 +01:00
2016-04-26 10:59:02 +02:00
2016-04-26 10:59:02 +02:00
2012-06-21 21:39:24 +02:00
2014-03-19 09:16:07 +01:00
2014-03-19 09:16:07 +01:00
2016-09-18 07:13:27 -07:00
2014-03-14 09:44:10 +01:00
2013-08-22 09:15:55 +02:00
2016-05-10 11:52:32 +02:00
2012-06-21 21:42:37 +02:00
2014-03-19 09:16:07 +01:00
2014-03-19 09:16:07 +01:00