Fix goToAngle/goToRelative: bypass broken ReelTwo path#64
Merged
thePunderWoman merged 1 commit intomainfrom Apr 21, 2026
Merged
Fix goToAngle/goToRelative: bypass broken ReelTwo path#64thePunderWoman merged 1 commit intomainfrom
thePunderWoman merged 1 commit intomainfrom
Conversation
The old implementation delegated to DomeDrive::domeStick() via DomePosition::kTarget mode. This had three bugs: 1. domeStick() only runs when a joystick is connected, so programmatic moves silently did nothing without a controller plugged in. 2. kTarget mode has a built-in 6-second idle delay (getDomeTargetMinDelay defaults to 6 s) before commanding the motor — we never configured it. 3. DomeDrive::moveDomeToTarget() uses the opposite sign convention from our encoder, driving the dome away from its target. Replace with a new kStateGoToAngle state that calls driveClosedLoop() directly — the same path already used by handleAbsoluteStick() and handleRandomMode(), which work correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
goToAngle()andgoToRelative()were routing throughDomeDrive::domeStick()viaDomePosition::kTargetmode, which has three bugs for an encoder-based drivekStateGoToAnglestate that callsdriveClosedLoop()directly — the same closed-loop path already used by absolute-stick and random-wander modesRoot cause — three compounding bugs
domeStick()only executes when a controller is connected, so programmatic moves silently did nothing without one.kTargetmode waits forgetDomeTargetMinDelay()(default 6 s) before moving — we never configured this parameter.moveDomeToTarget()treats clockwise distance as negative speed, opposite to our encoder's convention, so the dome drove away from its target.Test plan
pio run)pio test -e native)dome=<angle>serial command drives to the correct positiongoToRelative(used by sequence moves) arrives at the right heading🤖 Generated with Claude Code