Skip to content

Park dome at front (0 deg) after initial homing#62

Merged
thePunderWoman merged 1 commit intomainfrom
feature/dome-park-at-front-after-homing
Apr 19, 2026
Merged

Park dome at front (0 deg) after initial homing#62
thePunderWoman merged 1 commit intomainfrom
feature/dome-park-at-front-after-homing

Conversation

@thePunderWoman
Copy link
Copy Markdown
Owner

Summary

  • After the hall-sensor homing sweep completes, automatically seek to 0° (configured front) so the dome rests facing forward at startup instead of at the hall-sensor position.
  • Guarded: only runs when isCalibrated() (needs ticks-per-rev to translate degrees to ticks) and fFrontOffset != 0 (hall not already at front). Safe no-op otherwise.
  • Uses the existing speedTarget seek speed — same as any dome=<N> command.

Test plan

  • Native unit tests pass (pio test -e native) — 409/409.
  • Firmware build succeeds (pio run for megaatmega2560).
  • On hardware (calibrated, domefront != 0): power cycle → dome sweeps to hall, then automatically seeks forward.
  • On hardware (uncalibrated): power cycle → dome sweeps to hall and stops there (no auto-seek, no error).
  • On hardware (domefront = 0): power cycle → dome stops at hall (already at front, no extra movement).

🤖 Generated with Claude Code

The hall sensor rarely sits at the dome's configured front, so after
homing completes the dome would rest at an arbitrary offset. Now, once
homing finishes and provided the drive is calibrated and the front
offset is non-zero, the firmware automatically seeks 0 deg so the dome
ends up facing forward at startup.

No-ops safely when not yet calibrated (can't translate degrees to
ticks) or when frontOffset is 0 (hall already at front).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@thePunderWoman thePunderWoman merged commit 62390c8 into main Apr 19, 2026
1 check passed
@thePunderWoman thePunderWoman deleted the feature/dome-park-at-front-after-homing branch April 19, 2026 21:06
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.

1 participant