Repository navigation
suunto_nautic: handshake wait on reconnect, trimix, end pressure, /Summary values - #10
Merged
Merged
Conversation
… open On a quick reconnect the watch is still sending the tail of the stream the dropped link was reading. device_open took the first frame it read (often 0 bytes) as the handshake response and returned, so the first request went out before the watch had answered the handshake, and the Ocean dropped it about two times in three. Skip frames until the Hello-Ack (0x13) arrives, or continue once the link goes quiet.
…mperatures from /Summary The gas record holds O2 and He as int16 at +1 and +3 (the watch's own /Summary schema). He was read as a byte at +2, the high byte of O2, so helium always came out 0 and trimix decoded as nitrox. Also expose the water type at 0x3E as DC_FIELD_SALINITY, and take the diving-only average depth and the water temperature range from the dive record, as the Suunto app shows them. They are used under the same agreement check as the dive time; the temperatures only as a sane pair.
… dive The end pressure was the tank's last reading, but the watch keeps logging on the surface after the dive, where a shut and purged regulator reads about 1 bar (1791129285 ended at 0.9 bar against the app's 121.5). Take the last reading while Diving instead, and the watch's own end pressure from the DiveFooter's gas records when it is plausible. The DiveFooter's start pressure isn't used: it keeps a transmitter's pre-pairing dropout.
latishab
added a commit
to deepsealabs/libdc-swift
that referenced
this pull request
Oct 11, 2026
…ter#10 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three fixes from the #29 hardware testing.
Open waits for the handshake reply. On a reconnect a few seconds after a drop, the watch is still sending the interrupted /Data stream when the EVA handshake goes out.
device_opentook the first frame it read (often 0 bytes) as the reply and returned, so the first request went out before the Hello-Ack and the Ocean left it unanswered about two times in three (trustthegoose's frame trace on libdc-swift#29). It now skips frames until the Hello-Ack (0x13) arrives, or carries on once the link goes quiet./Summary values. He is an int16 at gas record +3 (the watch's own /Summary schema); it was read as a byte at +2, O2's high byte, so helium was always 0. The water type at 0x3E is exposed as
DC_FIELD_SALINITY, and the dive record's average depth and water temperature range are used under the same agreement check as the dive time. On the 13 corpus dives with a Suunto app export they match the app exactly (temperatures to 0.06 °C). One Ocean dive records its minimum above its maximum, so the temperatures are only taken as a sane pair.End pressure. It was the tank's last reading, but the watch keeps logging on the surface, where a shut and purged regulator reads about 1 bar: kreitje's Nautic S dive 1791129285 ended at 0.9 bar against the app's 121.5 (1763 psi). It is now the last reading while Diving, and the DiveFooter's own end pressure when plausible. The DiveFooter's start pressure isn't used, since it keeps a transmitter's pre-pairing dropout (9.1 bar on 1788683271).
Tests live in libdc-swift (fake watch + capture corpus), in the PR that bumps this submodule.
🤖 Generated with Claude Code