Add support for the Shearwater Peregrine

This commit is contained in:
Jef Driesen 2020-07-26 15:18:47 +02:00
parent 7a4c5e919f
commit e2ecd96daa
3 changed files with 6 additions and 0 deletions

View File

@ -339,6 +339,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Shearwater", "Perdix AI", DC_FAMILY_SHEARWATER_PETREL, 6, DC_TRANSPORT_BLE, dc_filter_shearwater},
{"Shearwater", "Nerd 2", DC_FAMILY_SHEARWATER_PETREL, 7, DC_TRANSPORT_BLE, dc_filter_shearwater},
{"Shearwater", "Teric", DC_FAMILY_SHEARWATER_PETREL, 8, DC_TRANSPORT_BLE, dc_filter_shearwater},
{"Shearwater", "Peregrine", DC_FAMILY_SHEARWATER_PETREL, 9, DC_TRANSPORT_BLE, dc_filter_shearwater},
/* Dive Rite NiTek Q */
{"Dive Rite", "NiTek Q", DC_FAMILY_DIVERITE_NITEKQ, 0, DC_TRANSPORT_SERIAL, NULL},
/* Citizen Hyper Aqualand */
@ -580,6 +581,7 @@ static int dc_filter_shearwater (dc_transport_t transport, const void *userdata,
"NERD 2",
"Perdix",
"Teric",
"Peregrine",
};
if (transport == DC_TRANSPORT_BLUETOOTH || transport == DC_TRANSPORT_BLE) {

View File

@ -42,6 +42,7 @@ extern "C" {
#define PERDIXAI 6
#define NERD2 7
#define TERIC 8
#define PEREGRINE 9
#define NSTEPS 10000
#define STEP(i,n) ((NSTEPS * (i) + (n) / 2) / (n))

View File

@ -232,6 +232,9 @@ shearwater_petrel_device_foreach (dc_device_t *abstract, dc_dive_callback_t call
case 0x0F0F:
model = TERIC;
break;
case 0x1512:
model = PEREGRINE;
break;
default:
WARNING (abstract->context, "Unknown hardware type %04x.", hardware);
}