Add support for the Atomic Aquatics Cobalt 2.
Remove an infinite loop.

If an unknown type byte is encountered, the offset isn't incremented,
resulting in an infinite loop. We now return an error instead.
Fix the detection of the last valid dive.

Normally, the last valid dive is followed by an empty entry with all
0xFF bytes. However, we received data from a device where a few of those
bytes are not equal to 0xFF. This causes the entry to be processed
incorrectly as a valid dive.

As a workaround, we now check the internal dive number for 0xFFFF.
Fix the initial gas mix for the D4i, D6i and D9tx.

The initial gas mix index has been confirmed for the D6i only. For the
other two models, it's an educated guess that the byte offset will be
identical.
Add support for trimix gas mixes.
Add support for the Hollis TX1.

The Hollis TX1 has several new features compared to the other models. It
supports trimix and up to 6 different gas mixes can be configured. It
also has twice the amount of memory, which requires an extra bit for the
ringbuffer pointers.
Merge branch 'hollistx1'
Add support for the Aeris A300.
Fix the Mares Nemo Wide 2 memory layout descriptor.

The Mares Nemo Wide 2 appears to have a slightly larger profile
ringbuffer, which extends to the end of the internal memory. It remains
to be seen whether this is also true for some of the other models. The
Mares Matrix is currently the only model where this is definitely not
the case.
Add more buffer overflow checks.

There are a few places left, where the contents of the buffer is
accessed without first inspecting the available length.
Add more error messages.

This makes debugging easier, because the error messages immediately
reveal where the problem is located, without needing a debugger.
Use the extended sample length stored in the data.

Currently, the buffer overflow checks take into account the size of the
entire dive. But since the length of the extended sample is stored in
the data, we can actually check for overflows in each sample. The main
benefit is that errors will be caught much earlier now.

An additional advantage is that we can now easily skip any remaining
sample bytes. Normally such bytes are not present, unless a firmware
update introduces a new feature which our parser doesn't support yet.
Add support for the new OSTC3 bailout event.

With the exception of the different event mask (single byte 0x80 vs two
byte 0x0100), the OSTC3 bailout event is identical to the OSTC2 variant.
Just as before, the new bailout event is reported to the application as
a normal gas change event.
Merge branch 'ostc'
Add support for ascent rate warnings.

The Cressi Leonardo does store an indicator for the ascent rate (e.g.
the number of arrows) in the upper two bits. This results in 4 possible
values, ranging from 0 to 3, with the following interpretation:

    0.0 -  3.9 m/min  No signal
    4.0 -  7.9 m/min  1 Arrow
    8.0 - 11.9 m/min  2 Arrows
   12.0+       m/min  3 Arrows (with STOP icon)

Reported-By: Nick Shore <support@mac-dive.com>
Fix the Mares Puck Pro memory layout descriptor.

The Mares Puck Pro uses the same memory layout as the Nemo Wide 2. See
commit 322227df7f65da8b4a962f3513e0a10b89cbe29d for more details.
Fix a typo in the profile ringbuffer start address.

The profile ringbuffer is supposed to be located after the logbook
ringbuffer, but due a silly typo they did overlap with 256 bytes.