Decode the serial number as a 32 bit number.

Apparantly there are also two different type of serial numbers present,
and their interpretation depends on the application. The Windows Dive
Organizer application shows both a serial number (byte offset 0x04) and
a warranty number (byte offset 0x0C). However, the Mac OS X Divers'
Diary application shows the number at byte offset 0x0C as the serial
number. Very confusing. For now, we just stick to the number at byte
offset 0x0C, because that's the number that is shown by the device
itself.
This commit is contained in:
Jef Driesen 2013-01-06 08:05:02 +01:00
parent 633e8423dc
commit 173390ed05

View File

@ -364,7 +364,7 @@ mares_iconhd_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback,
dc_event_devinfo_t devinfo;
devinfo.model = mares_iconhd_get_model (device, data[0]);
devinfo.firmware = 0;
devinfo.serial = array_uint16_le (data + 12);
devinfo.serial = array_uint32_le (data + 0x0C);
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
rc = mares_iconhd_extract_dives (abstract, dc_buffer_get_data (buffer),