You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR removes the physical hood mechanism from the shooter — deleting all related hardware drivers (PWM servo, CANcoder encoder, PID controller), lookup tables, and IDs, and collapsing the three-table ballistics system down to a single fixed-angle score table.
components/shooter.py / components/ballistics.py / ids.py: Hood hardware, angle tracking, pitch_to/pitch_min methods, hood_angle field in LookupTable, and all three former lookup tables removed cleanly; ForcedSolution tuple shrunk from 4 to 3 elements consistently across call sites.
components/leds.py: Hood-triggered LED states removed and replaced with a class-level RainbowAnimation, but the state-machine guard in execute() now prevents the animation from ever being applied (see inline comment).
robot.py: test_hood_angle tunable and related force_solution / pitch_to calls removed to match updated signatures.
Confidence Score: 3/5
The mechanical hood removal is consistent across all call sites, but the LED component is left in a state where the new rainbow animation is never sent to the CANdle.
The ballistics, shooter, ids, and robot changes are clean and internally consistent. The LED component has a broken state machine: both desired_state and current_state default to States.IDLE, and nothing in the updated codebase ever changes desired_state, so execute() always returns early and candle.set_control is never reached. The rainbow animation will silently never play.
components/leds.py — the execute() early-return logic needs attention now that the only state-changing callers have been removed.
Important Files Changed
Filename
Overview
components/leds.py
Hood-related LED states removed and desired_command set to RainbowAnimation, but the state-machine guard in execute() always short-circuits since desired_state and current_state both default to States.IDLE and nothing changes desired_state — the animation is never applied.
components/ballistics.py
Hood angle removed from LookupTable, ForcedSolution, and execute() cleanly; LookupTable constructor arguments and tuple unpacking are consistent throughout.
components/shooter.py
All hood hardware (PWM servo, CANcoder, PID controller) and related methods removed cleanly; only flywheel logic remains.
ids.py
Hood-related IDs (HOOD CANcoder, HOOD_ENCODER DIO, HOOD_SERVO PWM) removed from their respective enums.
robot.py
test_hood_angle tunable and pitch_to / force_solution hood-angle references removed in lockstep with the updated BallisticsComponent.force_solution signature.
desired_state and current_state are both initialised to States.IDLE, and nothing in the post-PR codebase ever changes desired_state (the two setters that mutated it, hood_is_retracted and hood_is_not_retracted, were deleted). Every execute() call therefore hits if self.desired_state == self.current_state: return and exits before candle.set_control(self.desired_command) is reached. The rainbow animation is never sent to the CANdle.
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
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.
rest in peace, you had a good run.