Skip to content

libdivecomputer: Preserve Heinrichs Weikamp product refinement - #137

Merged
mikeller merged 2 commits into
subsurface:Subsurface-DS9from
mikeller:fix/hw-ostc3-model-semantics-119
Sep 14, 2026
Merged

mikeller merged 2 commits into
subsurface:Subsurface-DS9from
mikeller:fix/hw-ostc3-model-semantics-119

Conversation

@mikeller

Copy link
Copy Markdown
Member

Restore upstream hwOS device-info model semantics while retaining the existing Heinrichs Weikamp product resolution through the generic hardware-ID refinement path.

  • Report model 0 for legacy hwOS devices, with 0x43 and 0x44 for OSTC 4 and OSTC 5.
  • Use the raw hardware descriptor to refine recognised product labels, including legacy models.
  • Return an unsupported error for unavailable five-byte HARDWARE2 requests.
  • Preserve OSTCTools imported-device labels separately from parser model selection.
  • Add OSTCTools import coverage for the supplied legacy fixtures.

Testing

  • Focused dc_descriptor_find_by_hw_id() lookup test covering 11 Heinrichs Weikamp hardware IDs.
  • ctest --output-on-failure (34/34 passed).

Report model 0 for legacy hwOS devices and retain the OSTC 4 and
OSTC 5 model bytes. Keep hardware identifiers separate so only their
unique descriptors can refine the selected product.

Signed-off-by: Michael Keller <github@ike.ch>
Keep the established HW OSTC3 product resolution in the hardware-ID
refinement map while device-info model values follow the protocol.

Signed-off-by: Michael Keller <github@ike.ch>

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.

🟢 Approval recommended

No unresolved blocking issues were identified.

Pull request overview

Restores hwOS model semantics while preserving Heinrichs Weikamp product identification through hardware-ID refinement.

Changes:

  • Reports legacy model 0, with OSTC 4/5 models 0x43/0x44.
  • Adds hardware-ID mappings for 11 Heinrichs Weikamp devices.
  • Preserves unsupported five-byte HARDWARE2 responses.
File summaries
File Description
src/hw_ostc3.c Updates model reporting, hardware requests, and device-info hardware IDs.
src/descriptor.c Adds hardware-ID product refinement and coarse hwOS descriptors.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mikeller
mikeller merged commit c3c612a into subsurface:Subsurface-DS9 Sep 14, 2026
11 checks passed
@mikeller
mikeller deleted the fix/hw-ostc3-model-semantics-119 branch September 14, 2026 07:55
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