A helper function is added to simplify implementing the devic_dump()
function on top of the device_read() function, and enable progress
events automatically.
Using a resizable memory buffer allows to allocate the right amount of
memory inside the backend, avoiding having to know the required buffer
size in advance.
We accept NULL pointers if the size is zero, but the C standard
library functions memcpy and memmove requires valid pointers, even if
the size is zero.
The logbook ringbuffer is now considered empty if any of the pointers is
outside the valid ringbuffer area. Compared to checking only against a
special empty value, this approach makes the code more robust against
invalid pointers.
The memory layout of the Mares Puck and Nemo devices is very similar,
which allows to share the parsing code between the backends.
The Mares Puck protocol allows for a more efficient implementation, by
reading only the data that we really need. But as an intermediate
solution, reusing the Nemo code is good enough.
The DTR line is used to initialize or reset the communication. Toggling
this line before each transfer, rather than doing it once at startup,
allows to perform multiple transfers in the same session.
Some devices do not appear to set the ringbuffer pointers to their
normal empty values (e.g. pointing outside the ringbuffer memory). In
that case, there appears to be a single entry. But since that entry
contains uninitialized memory (e.g. all 0xFF bytes), we are able to
detect this special situation.
The packet size should include both the number of parameter bytes and
the number of data bytes. The packet verification code is modified to be
able to deal with this change too.
Although calibration is optional, it's highly recommended because it
reduces the transfer time considerably. The calibrate function is
removed from the public api.
The memory layout of the Suunto Eon and Vyper devices is very similar,
which allows to share the parsing code between the backends. Differences
in the layout are passed by means of a new layout descriptor structure
and a common base class is introduced to share the fingerprint data.
Memory buffers are now allocated dynamically to support devices with
different amounts of memory.
Introducing a common base class allows to share more code between the
backends. Sharing the fingerprint data eliminates the need to pass it
with a function parameter.
The memory layout of all Oceanic devices is very similar, which allows
to share the parsing code between the different backends. Differences in
the layout are passed by means of a new layout descriptor structure.
Memory buffers are now allocated dynamically to support devices with
different amounts of memory.
When the IRDA backend is disabled or not supported by the underlying
platform (such as on Mac OS X), the Uwatec Smart parser is disabled as
well. The symbols file is updated to reflect this.
Logbook entries are now downloaded one by one, until a previously
downloaded entry is identified. This approach reduces the amount of data
that needs to be transfered in the typical case, where only a few new
dives are available on the device.