From 0efa420b716fb35f15362935579cc50fc13c37ac Mon Sep 17 00:00:00 2001 From: Janice Date: Wed, 14 Oct 2015 09:11:47 +0200 Subject: [PATCH 1/2] Convert ndl/deco time to seconds. --- src/oceanic_atom2_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c index b13a9f8..0a6508f 100644 --- a/src/oceanic_atom2_parser.c +++ b/src/oceanic_atom2_parser.c @@ -717,6 +717,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ // bytes 6 & 7 encode minutes of NDL / deco if (parser->model == A300CS || parser->model == VTX) { unsigned int deco = (data[offset + 15] & 0x70) >> 4; + unsigned int decotime = array_uint16_le(data + offset + 6) & 0x03FF; if (deco) { sample.deco.type = DC_DECO_DECOSTOP; sample.deco.depth = deco * 10 * FEET; @@ -724,7 +725,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ sample.deco.type = DC_DECO_NDL; sample.deco.depth = 0.0; } - sample.deco.time = array_uint16_le(data + offset + 6) & 0x03FF; + sample.deco.time = decotime * 60; if (callback) callback (DC_SAMPLE_DECO, sample, userdata); } From 00e0cfa0ab2ac75178eca45b30f9fe202348e4d5 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 16 Oct 2015 14:24:42 +0200 Subject: [PATCH 2/2] Mention Shearwater Nerd alongside with Petrel 2 Signed-off-by: Robert C. Helling --- src/descriptor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/descriptor.c b/src/descriptor.c index 91a75fb..18c8d77 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -238,6 +238,7 @@ static const dc_descriptor_t g_descriptors[] = { /* Shearwater Petrel */ {"Shearwater", "Petrel", DC_FAMILY_SHEARWATER_PETREL, 3}, {"Shearwater", "Petrel 2", DC_FAMILY_SHEARWATER_PETREL, 3}, + {"Shearwater", "Nerd", DC_FAMILY_SHEARWATER_PETREL, 3}, /* Dive Rite NiTek Q */ {"Dive Rite", "NiTek Q", DC_FAMILY_DIVERITE_NITEKQ, 0}, /* Citizen Hyper Aqualand */