From 8eb1c1232ef588fc0b7439dc5ae8850b8547c120 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 21 Jul 2016 19:42:14 +0900 Subject: [PATCH] Suunto EON Steel: add surface time reporting For some reason I hadn't reported surface time. It's trivial to do especially now that we have the varargs string adding function. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- src/suunto_eonsteel_parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index 22f86da..dd75d9d 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -1385,6 +1385,11 @@ static int traverse_diving_fields(suunto_eonsteel_parser_t *eon, const struct ty return add_string_fmt(eon, "Desaturation Time", "%d:%02d", time / 60, time % 60); } + if (!strcmp(name, "SurfaceTime")) { + unsigned int time = array_uint32_le(data) / 60; + return add_string_fmt(eon, "Surface Time", "%d:%02d", time / 60, time % 60); + } + return 0; }