Fix the McLean Extreme fingerprint feature
Currently the fingerprint feature uses the first 7 bytes of the computer configuration data. Since this information does not uniquely identify a dive, and is actually often identical for several dives, no new dives are detected anymore. Fixed by using the date/time timestamp at the start of the dive configuration data instead. Reported-by: David Carron <david_de_carron@hotmail.com>
This commit is contained in:
parent
0f677fcaac
commit
034819cd2d
@ -42,7 +42,7 @@
|
||||
#define CMD_FIRMWARE 0xAD
|
||||
|
||||
#define SZ_PACKET 512
|
||||
#define SZ_FINGERPRINT 7
|
||||
#define SZ_FINGERPRINT 4
|
||||
#define SZ_CFG 0x002D
|
||||
#define SZ_COMPUTER (SZ_CFG + 0x6A)
|
||||
#define SZ_HEADER (SZ_CFG + 0x31)
|
||||
@ -580,10 +580,10 @@ mclean_extreme_device_foreach(dc_device_t *abstract, dc_dive_callback_t callback
|
||||
unsigned char *data = dc_buffer_get_data(buffer);
|
||||
unsigned int size = dc_buffer_get_size(buffer);
|
||||
|
||||
if (memcmp(data, device->fingerprint, sizeof(device->fingerprint)) == 0)
|
||||
if (memcmp(data + SZ_CFG, device->fingerprint, sizeof(device->fingerprint)) == 0)
|
||||
break;
|
||||
|
||||
if (callback && !callback (data, size, data, sizeof(device->fingerprint), userdata)) {
|
||||
if (callback && !callback (data, size, data + SZ_CFG, sizeof(device->fingerprint), userdata)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user