From ce578cafb9c4e855f88d6d5f4983b5211228e321 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 11 Aug 2022 18:00:12 +0200 Subject: [PATCH] Report the dive mode for Air and Nitrox dives Currently the dive mode is only reported for rebreather dives. --- src/suunto_eonsteel_parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index db24cf3..c5d7a63 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -1338,7 +1338,10 @@ static int traverse_diving_fields(suunto_eonsteel_parser_t *eon, const struct ty } if (!strcmp(name, "DiveMode")) { - if (!strncmp((const char *)data, "CCR", 3)) { + if (!strncmp((const char *)data, "Air", 3) || !strncmp((const char *)data, "Nitrox", 6)) { + eon->cache.divemode = DC_DIVEMODE_OC; + eon->cache.initialized |= 1 << DC_FIELD_DIVEMODE; + } else if (!strncmp((const char *)data, "CCR", 3)) { eon->cache.divemode = DC_DIVEMODE_CCR; eon->cache.initialized |= 1 << DC_FIELD_DIVEMODE; }