From ddb9095a2df0bab817a38087859ab73b6bbc9e18 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Tue, 23 Dec 2025 14:33:25 +1300 Subject: [PATCH] Fix TTS Reporting. Fix the reporting of TTS (Time To Surface) on a number of dive computers. Report '0' (TTS not known) instead of an arbitrary number when building on Fedora. Signed-off-by: Michael Keller --- src/deepsix_excursion_parser.c | 1 + src/garmin_parser.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/deepsix_excursion_parser.c b/src/deepsix_excursion_parser.c index b448cfe5..eae86b37 100644 --- a/src/deepsix_excursion_parser.c +++ b/src/deepsix_excursion_parser.c @@ -752,6 +752,7 @@ deepsix_excursion_parser_samples_foreach_v1 (dc_parser_t *abstract, dc_sample_ca sample.deco.depth = 0; sample.deco.time = deco_ndl_tts; } + sample.deco.tts = 0; if (callback) callback (DC_SAMPLE_DECO, &sample, userdata); break; default: diff --git a/src/garmin_parser.c b/src/garmin_parser.c index 05b9b048..0dd5bec9 100644 --- a/src/garmin_parser.c +++ b/src/garmin_parser.c @@ -297,6 +297,7 @@ static void flush_pending_record(struct garmin_parser_t *garmin) sample.deco.type = DC_DECO_DECOSTOP; sample.deco.time = record->stop_time; sample.deco.depth = record->ceiling; + sample.deco.tts = 0; garmin->callback(DC_SAMPLE_DECO, &sample, garmin->userdata); } @@ -581,6 +582,7 @@ DECLARE_FIELD(RECORD, ndl, UINT32) // s dc_sample_value_t sample = {0}; sample.deco.type = DC_DECO_NDL; sample.deco.time = data; + sample.deco.tts = 0; garmin->callback(DC_SAMPLE_DECO, &sample, garmin->userdata); } }