Skip to content

shearwater: separate and limit calibration pass - #138

Merged
mikeller merged 2 commits into
subsurface:Subsurface-DS9from
mikeller:feat/shearwater-calibration-pass-109-110
Sep 14, 2026
Merged

mikeller merged 2 commits into
subsurface:Subsurface-DS9from
mikeller:feat/shearwater-calibration-pass-109-110

Conversation

@mikeller

Copy link
Copy Markdown
Member

Split the Shearwater sample traversal into a shared internal implementation, a typed private calibration pre-pass, and the vtable callback wrapper.

The calibration pass no longer reinterprets callback userdata. Its ppO2 source state is cached on the parser, and the pass now runs only for CCR and SCR dives.

Tested with:

  • make -j2
  • test/run-parse.sh

Share one sample traversal between the vtable callback and the private calibration pass. Keep calibration results typed and cache the ppo2 source on the parser.

Signed-off-by: Michael Keller <github@ike.ch>
The calibration pass only produces CCR and SCR state, so skip it for open-circuit, gauge, and freedive profiles.

Signed-off-by: Michael Keller <github@ike.ch>
Copilot AI lite review requested due to automatic review settings September 13, 2026 02:26

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 review issues were identified.

Pull request overview

Refactors Shearwater sample traversal to separate calibration preprocessing and cache ppO2 source state.

Changes:

  • Adds parser-owned ppO2 source tracking.
  • Restricts calibration prepasses to CCR/SCR dives.
  • Separates internal traversal from the public callback wrapper.
File summaries
File Description
src/shearwater_predator_parser.c Implements the traversal refactor and calibration prepass.
Review details
  • Files reviewed: 1/1 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 cba69db into subsurface:Subsurface-DS9 Sep 14, 2026
11 checks passed
@mikeller
mikeller deleted the feat/shearwater-calibration-pass-109-110 branch September 14, 2026 07:53
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