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.
This commit is contained in:
Jef Driesen 2014-02-19 14:24:52 +01:00
parent f836e6a025
commit 2064c3d410

View File

@ -275,7 +275,7 @@ cressi_leonardo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
dc_event_devinfo_t devinfo;
devinfo.model = data[0];
devinfo.firmware = 0;
devinfo.serial = array_uint32_le (data + 1);
devinfo.serial = array_uint24_le (data + 1);
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
rc = cressi_leonardo_extract_dives (abstract, dc_buffer_get_data (buffer),