Skip to content

DiveSystem: Handle APOS5 sample record alias. - #119

Open
mikeller wants to merge 2 commits into
subsurface:Subsurface-DS9from
mikeller:feat/ratio-8006-import-#14
Open

DiveSystem: Handle APOS5 sample record alias.#119
mikeller wants to merge 2 commits into
subsurface:Subsurface-DS9from
mikeller:feat/ratio-8006-import-#14

Conversation

@mikeller

Copy link
Copy Markdown
Member

Treat APOS5 record type 0x8006 as an ordinary profile sample while preserving the existing handling for all other record types.

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>
Copilot AI lite review requested due to automatic review settings August 14, 2026 08:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
Copilot AI review requested due to automatic review settings August 14, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

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.

2 participants