From f836e6a0252993f2594a4fbd03b229602725b6f0 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Wed, 19 Feb 2014 14:22:31 +0100 Subject: [PATCH] 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. --- src/cressi_leonardo.c | 2 +- src/descriptor.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cressi_leonardo.c b/src/cressi_leonardo.c index e18b496..3a69e9a 100644 --- a/src/cressi_leonardo.c +++ b/src/cressi_leonardo.c @@ -273,7 +273,7 @@ cressi_leonardo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba unsigned char *data = dc_buffer_get_data (buffer); dc_event_devinfo_t devinfo; - devinfo.model = 0; + devinfo.model = data[0]; devinfo.firmware = 0; devinfo.serial = array_uint32_le (data + 1); device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo); diff --git a/src/descriptor.c b/src/descriptor.c index 1340d65..aa8d0e1 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -200,7 +200,8 @@ static const dc_descriptor_t g_descriptors[] = { /* Cressi Edy */ {"Cressi", "Edy", DC_FAMILY_CRESSI_EDY, 0}, /* Cressi Leonardo */ - {"Cressi", "Leonardo", DC_FAMILY_CRESSI_LEONARDO, 0}, + {"Cressi", "Leonardo", DC_FAMILY_CRESSI_LEONARDO, 1}, + {"Cressi", "Giotto", DC_FAMILY_CRESSI_LEONARDO, 4}, /* Zeagle N2iTiON3 */ {"Zeagle", "N2iTiON3", DC_FAMILY_ZEAGLE_N2ITION3, 0}, {"Apeks", "Quantum X", DC_FAMILY_ZEAGLE_N2ITION3, 0},