>From c6e045bb7060b421adbf2b44388ebe72229b68d8 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 16 Oct 2014 15:16:15 +0200 Subject: [PATCH 5/5] Implement deco algorithm field for Suunto dive computers All Suunto dive computers use RGBM. Arguably this is slightly redundant - but it should make things easier for an aplication trying to display the deco algorithm used. Signed-off-by: Dirk Hohndel --- src/suunto_d9_parser.c | 3 +++ src/suunto_eon_parser.c | 3 +++ src/suunto_solution_parser.c | 3 +++ src/suunto_vyper_parser.c | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/suunto_d9_parser.c b/src/suunto_d9_parser.c index 63c6d0cbbdfd..1782618534cb 100644 --- a/src/suunto_d9_parser.c +++ b/src/suunto_d9_parser.c @@ -326,6 +326,9 @@ suunto_d9_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsigne gasmix->oxygen = parser->oxygen[flags] / 100.0; gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium; break; + case DC_FIELD_DECO_ALG: + *((unsigned int *) value) = DC_DECO_RGBM; + break; default: return DC_STATUS_UNSUPPORTED; } diff --git a/src/suunto_eon_parser.c b/src/suunto_eon_parser.c index f89fe2aeef2c..a2301f28b82e 100644 --- a/src/suunto_eon_parser.c +++ b/src/suunto_eon_parser.c @@ -197,6 +197,9 @@ suunto_eon_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsign gasmix->oxygen = 0.21; gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium; break; + case DC_FIELD_DECO_ALG: + *((unsigned int *) value) = DC_DECO_RGBM; + break; default: return DC_STATUS_UNSUPPORTED; } diff --git a/src/suunto_solution_parser.c b/src/suunto_solution_parser.c index 0d9e9783259f..4f8af99dbfa8 100644 --- a/src/suunto_solution_parser.c +++ b/src/suunto_solution_parser.c @@ -163,6 +163,9 @@ suunto_solution_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, u gasmix->oxygen = 0.21; gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium; break; + case DC_FIELD_DECO_ALG: + *((unsigned int *) value) = DC_DECO_RGBM; + break; default: return DC_STATUS_UNSUPPORTED; } diff --git a/src/suunto_vyper_parser.c b/src/suunto_vyper_parser.c index b42a24dad4b5..efb02a7362a9 100644 --- a/src/suunto_vyper_parser.c +++ b/src/suunto_vyper_parser.c @@ -187,6 +187,9 @@ suunto_vyper_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi gas->oxygen = 0.21; gas->nitrogen = 1.0 - gas->oxygen; break; + case DC_FIELD_DECO_ALG: + *((unsigned int *) value) = DC_DECO_RGBM; + break; default: return DC_STATUS_UNSUPPORTED; } -- 1.8.0.rc0.18.gf84667d