From 58ea31e62e900c0cf3fdbf7ffd5af4a1d6226389 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Tue, 25 Jul 2023 22:47:17 +1200 Subject: [PATCH] Cressi Leonardo: Turn ascent warnings into info events. According to user feedback the ascent warnings on the Cressi Leonardo are very sensitive. They come in 3 different levels. This change turns levels 1 and 2 into info events, leaving only 3 as a warning. Fixes https://groups.google.com/g/subsurface-divelog/c/qBXF0wmyjKg/m/5qA0_KABCQAJ Signed-off-by: Michael Keller --- src/cressi_leonardo_parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cressi_leonardo_parser.c b/src/cressi_leonardo_parser.c index eefebdf..7ef6f98 100644 --- a/src/cressi_leonardo_parser.c +++ b/src/cressi_leonardo_parser.c @@ -229,8 +229,13 @@ cressi_leonardo_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac if (ascent) { sample.event.type = SAMPLE_EVENT_ASCENT; sample.event.time = 0; - sample.event.flags = 0; + if (ascent < 3) + // Turn the overly sensitive ascent warnings of this dive computer into info events + sample.event.flags = SAMPLE_FLAGS_SEVERITY_INFO; + else + sample.event.flags = 0; sample.event.value = ascent; + if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); }