From 2064c3d41050f15bca151ecbf1667733d25eb286 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Wed, 19 Feb 2014 14:24:52 +0100 Subject: [PATCH] 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. --- src/cressi_leonardo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cressi_leonardo.c b/src/cressi_leonardo.c index 3a69e9a..b295098 100644 --- a/src/cressi_leonardo.c +++ b/src/cressi_leonardo.c @@ -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),