Skip to content

Conversation

@mikeller
Copy link
Member

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 github@ike.ch

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 <github@ike.ch>
Copilot AI review requested due to automatic review settings December 23, 2025 01:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes TTS (Time To Surface) reporting across multiple dive computer parsers by explicitly initializing the tts field to 0 when TTS data is not available, preventing arbitrary values from being reported due to uninitialized memory.

  • Adds explicit sample.deco.tts = 0 initialization in Garmin and DeepSix parsers
  • Ensures consistent behavior across different platforms and compilers (specifically addressing Fedora build issues)
  • Follows the established pattern used throughout the codebase where TTS=0 indicates "not known"

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/garmin_parser.c Adds TTS initialization to 0 for both DECOSTOP and NDL deco sample types where TTS data is not available from the device
src/deepsix_excursion_parser.c Adds TTS initialization to 0 for all deco sample types (DECOSTOP, SAFETYSTOP, and NDL) in the v1 parser

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant