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.
This commit is contained in:
Jef Driesen 2014-02-19 14:22:31 +01:00
parent 1f086a0f90
commit f836e6a025
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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},