From 811a9b4f89498a337301429b8e8578e61f34a6a9 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 7 Feb 2022 19:03:46 +0100 Subject: [PATCH] Report the correct dive mode for SCR dives The status field contains an extra bit for SCR dives, so there is no reason to report them as CCR dives. --- src/shearwater_predator_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c index 290001a..9fd9656 100644 --- a/src/shearwater_predator_parser.c +++ b/src/shearwater_predator_parser.c @@ -391,7 +391,7 @@ shearwater_predator_parser_cache (shearwater_predator_parser_t *parser) // Status flags. unsigned int status = data[offset + 11 + pnf]; if ((status & OC) == 0) { - mode = DC_DIVEMODE_CCR; + mode = status & SC ? DC_DIVEMODE_SCR : DC_DIVEMODE_CCR; } // Gaschange.