Add Mares Puck 2 dive computer

This dive computer has the same enclosure as the Mares Puck, but the
wire protocol is that of the Puck Pro. The original software identifies
it as a "Mares Puck 2", and the handshake string also contains the
sequence "PUCK 2", so this string is used to identify the device.
This commit is contained in:
Alexander Neumann 2013-08-11 22:56:03 +02:00 committed by Jef Driesen
parent 5f8da384e6
commit 37cb54c376
2 changed files with 4 additions and 2 deletions

View File

@ -183,6 +183,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Mares", "Icon HD Net Ready", DC_FAMILY_MARES_ICONHD , 0x15},
{"Mares", "Puck Pro", DC_FAMILY_MARES_ICONHD , 0x18},
{"Mares", "Nemo Wide 2", DC_FAMILY_MARES_ICONHD , 0x19},
{"Mares", "Puck 2", DC_FAMILY_MARES_ICONHD , 0x1F},
/* Heinrichs Weikamp */
{"Heinrichs Weikamp", "OSTC", DC_FAMILY_HW_OSTC, 0},
{"Heinrichs Weikamp", "OSTC Mk2", DC_FAMILY_HW_OSTC, 1},

View File

@ -48,6 +48,7 @@
#define ICONHDNET 0x15
#define PUCKPRO 0x18
#define NEMOWIDE2 0x19
#define PUCK2 0x1F
#define ACK 0xAA
#define EOF 0xEA
@ -261,7 +262,7 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char *
device->port = NULL;
memset (device->fingerprint, 0, sizeof (device->fingerprint));
memset (device->version, 0, sizeof (device->version));
if (model == NEMOWIDE2 || model == MATRIX || model == PUCKPRO) {
if (model == NEMOWIDE2 || model == MATRIX || model == PUCKPRO || model == PUCK2) {
device->layout = &mares_matrix_layout;
device->packetsize = 64;
} else {
@ -278,7 +279,7 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char *
}
// Set the serial communication protocol (256000 8N1).
if (model == NEMOWIDE2 || model == MATRIX || model == PUCKPRO) {
if (model == NEMOWIDE2 || model == MATRIX || model == PUCKPRO || model == PUCK2) {
rc = serial_configure (device->port, 115200, 8, SERIAL_PARITY_EVEN, 1, SERIAL_FLOWCONTROL_NONE);
} else {
rc = serial_configure (device->port, BAUDRATE, 8, SERIAL_PARITY_NONE, 1, SERIAL_FLOWCONTROL_NONE);