Update the Shearwater hardware IDs

Update and fix the hardware IDs based on the latest information from
Shearwater.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-06-14 13:40:17 -07:00 committed by Jef Driesen
parent be5bb9e690
commit 8451286c17
2 changed files with 23 additions and 5 deletions

View File

@ -37,6 +37,7 @@ extern "C" {
#define PREDATOR 2
#define PETREL 3
#define PETREL2 PETREL
#define NERD 4
#define PERDIX 5
#define PERDIXAI 6

View File

@ -212,15 +212,30 @@ shearwater_petrel_device_foreach (dc_device_t *abstract, dc_dive_callback_t call
unsigned int hardware = array_uint_be (dc_buffer_get_data (buffer), dc_buffer_get_size (buffer));
unsigned int model = 0;
switch (hardware) {
case 0x0808: // Petrel 2
case 0x0909: // Petrel 1
case 0x0B0B: // Petrel 1 (newer hardware)
case 0x0101:
case 0x0202:
model = PREDATOR;
break;
case 0x0404:
case 0x0909:
model = PETREL;
break;
case 0x0A0A: // Nerd 1
case 0x0505:
case 0x0808:
case 0x0838:
case 0x08A5:
case 0x0B0B:
case 0x7828:
case 0x7B2C:
case 0x8838:
model = PETREL2;
break;
case 0x0606:
case 0x0A0A:
model = NERD;
break;
case 0x0E0D: // Nerd 2
case 0x0E0D:
case 0x7E2D:
model = NERD2;
break;
case 0x0707:
@ -231,6 +246,8 @@ shearwater_petrel_device_foreach (dc_device_t *abstract, dc_dive_callback_t call
model = PERDIXAI;
break;
case 0x0F0F:
case 0x1F0A:
case 0x1F0F:
model = TERIC;
break;
case 0x1512: