Use the correct model number for the Shearwater Nerd 2

Unlike the Shearwater Petrel, the Shearwater Nerd 2 appears to have a
distinct model number from the Nerd.

Reported-by: Janice McLaughlin <janice@moremobilesoftware.com>
This commit is contained in:
Jef Driesen 2018-01-04 15:14:10 +01:00
parent 21b0f01852
commit c3556d81c9
3 changed files with 5 additions and 2 deletions

View File

@ -292,9 +292,9 @@ static const dc_descriptor_t g_descriptors[] = {
{"Shearwater", "Petrel", DC_FAMILY_SHEARWATER_PETREL, 3},
{"Shearwater", "Petrel 2", DC_FAMILY_SHEARWATER_PETREL, 3},
{"Shearwater", "Nerd", DC_FAMILY_SHEARWATER_PETREL, 4},
{"Shearwater", "Nerd 2", DC_FAMILY_SHEARWATER_PETREL, 4},
{"Shearwater", "Perdix", DC_FAMILY_SHEARWATER_PETREL, 5},
{"Shearwater", "Perdix AI", DC_FAMILY_SHEARWATER_PETREL, 6},
{"Shearwater", "Nerd 2", DC_FAMILY_SHEARWATER_PETREL, 7},
/* Dive Rite NiTek Q */
{"Dive Rite", "NiTek Q", DC_FAMILY_DIVERITE_NITEKQ, 0},
/* Citizen Hyper Aqualand */

View File

@ -38,6 +38,7 @@ extern "C" {
#define NERD 4
#define PERDIX 5
#define PERDIXAI 6
#define NERD2 7
#define NSTEPS 10000
#define STEP(i,n) ((NSTEPS * (i) + (n) / 2) / (n))

View File

@ -224,9 +224,11 @@ shearwater_petrel_device_foreach (dc_device_t *abstract, dc_dive_callback_t call
model = PETREL;
break;
case 0x0A0A: // Nerd 1
case 0x0E0D: // Nerd 2
model = NERD;
break;
case 0x0E0D: // Nerd 2
model = NERD2;
break;
case 0x0707:
model = PERDIX;
break;