log: add filter wheel position diagnostics - #545
Merged
Alpaca233 merged 1 commit intoMay 19, 2026
Conversation
Five INFO/WARNING lines to help diagnose when a wheel lands at the wrong slot. Targets the cases that aren't already covered by upstream's recovery-path warnings: - __init__: firmware version + skip_init flag - __init__: per-wheel motor_slot, slot range, offset (config sanity check) - __init__: WARNING when skip_init=True (tracked position assumed, not verified by homing) - _move_to_position: 'wheel N: current -> target (usteps=X)' on every move — the absolute usteps target is the most direct signal for diagnosing slot-misalignment - _home_wheel: entry (prev tracked position) + exit (elapsed time) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds targeted INFO/WARNING diagnostics to SquidFilterWheel to help troubleshoot filter-wheel position drift without changing motion behavior. The new logs provide visibility into firmware/initialization context, config parameters used to compute absolute microstep targets, and basic timing/traceability around move and home operations.
Changes:
- Log firmware version +
skip_initduringSquidFilterWheel.__init__, and warn whenskip_init=True(tracked positions assumed without homing). - Log per-wheel configuration parameters (motor slot, slot index range, offset) at startup.
- Log each absolute move with
current -> targetand computed absoluteusteps, plus home entry/exit timing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Add five INFO/WARNING log lines to
SquidFilterWheelto make filter-wheel position drift easier to diagnose. Targets cases that aren't already covered by the existing recovery-path warnings introduced in #540.__init__: firmware version +skip_initflag__init__: per-wheelmotor_slot, slot range, offset — config sanity check__init__: WARNING whenskip_init=True(tracked position assumed, never verified by homing — a known way for tracked/physical to diverge)_move_to_position:wheel N: current -> target (usteps=X)on every move. The absolute usteps target is the most direct signal for diagnosing slot-misalignment — if usteps is wrong, the config math is suspect; if usteps is right but the slot is wrong, it's hardware/firmware._home_wheel: entry (prev tracked position) + exit (elapsed time)No behavior changes. +15 lines, no deletions.
Test plan
Filter wheel N: A -> B (usteps=X)appears in log--skip-initand verify the WARNING surfaces🤖 Generated with Claude Code