12 Commits

Author SHA1 Message Date
Jef Driesen
cde70334b0 Initialize the fingerprint before use.
The fingerprint is used unconditionally, regardless of whether it's
explicitly set by the application or not. Therefore it needs to be
initialized properly.
2014-08-26 22:07:59 +02:00
Jef Driesen
48924123a6 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.
2014-05-19 22:57:49 +02:00
Jef Driesen
6b912f4f7b 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.
2014-04-07 11:05:14 +02:00
Jef Driesen
2064c3d410 Fix the parsing of the serial number.
The serial number appears to be either a 24 or a 16 bit number, but
certainly not a 32bit number. Whether it's 24 or 16 bit is hard to
tell because the data we have available always contains a zero value
in the third byte.
2014-02-19 14:24:52 +01:00
Jef Driesen
f836e6a025 Add support for the Cressi Giotto.
The communication protocol and memory layout of the Cressi Giotto
appears to be identical to that of the Leonardo. The first byte seems
to be the model number, with 0x01 for the Leonardo and 0x04 for the
Giotto.
2014-02-19 14:22:31 +01:00
Jef Driesen
ee8b4e36ad Merge branch 'release-0.3'
Integrate the bugfixes from the stable branch.
2013-05-13 23:49:37 +02:00
Jef Driesen
c429947f25 Add a devinfo event containing the serial number. 2013-04-29 20:58:10 +02:00
Jef Driesen
9297e390a8 Flush the serial buffers after opening the port.
Sometimes there are garbage bytes present after opening the serial
port, which causes the communication to fail. Flushing the buffers
after a small delay is all it takes to get rid of those bytes.
2013-04-29 20:47:26 +02:00
Jef Driesen
20f813d5bc Fix a potential NULL pointer dereference. 2013-04-25 20:45:28 +02:00
Jef Driesen
6419e189a4 Add a single isinstance function per object type.
Currently, each backend has it's own function to verify whether the
object vtable pointer is the expected one. All these functions can be
removed in favor of a single isintance function in the base class,
which takes the expected vtable pointer as a parameter.

Functions which are called through the vtable, don't need to verify the
vtable pointer, and those checks are removed.
2013-04-16 12:18:54 +02:00
Jef Driesen
007479fc92 Rename the backend structure to vtable.
The term "backend" can be confusing because it can refer to both the
virtual function table and the device/parser backends. The use of the
term "vtable" avoids this.
2013-04-16 12:18:53 +02:00
Jef Driesen
0b20855d56 Add support for the Cressi Leonardo.
This is only a preliminary version. There is certainly some room for
improvement, but the basic functionality is already in place. That
should be sufficient for daily use, and possibles issues can always be
fixed when discovered.
2013-02-04 17:20:23 +01:00