DiveSystem: Handle APOS5 sample record alias. - #119
Open
mikeller wants to merge 2 commits into
Open
Conversation
Treat APOS5 record type 0x8006 as an ordinary profile sample while preserving the existing handling for all other record types. Signed-off-by: Michael Keller <github@ike.ch>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the DiveSystem iDive parser to recognize an APOS5-specific record type alias so that dives recorded with APOS5 continue to parse as normal profile samples.
Changes:
- Adds a new record-type constant for the APOS5 “sample” alias (0x8006).
- Normalizes record type 0x8006 to the standard sample record type during sample iteration.
Fixes libdivecomputer/libdivecomputer#66
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+468
to
+472
| // AI-generated (Claude) | ||
| // APOS5 uses 0x8006 for ordinary profile samples. Keep this alias | ||
| // narrow until the record type is confirmed by the vendor. | ||
| if (type == REC_SAMPLE_APOS5_COMPAT) | ||
| type = REC_SAMPLE; |
Apply the 0x8006 compatibility mapping only when the recorded firmware major is APOS5 or newer, leaving older iX3M records to the existing unknown-type handling. Signed-off-by: Michael Keller <github@ike.ch>
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.
Treat APOS5 record type 0x8006 as an ordinary profile sample while preserving the existing handling for all other record types.