Skip to content

Rip glorious hood#345

Merged
SyntaxBreak merged 2 commits into
mainfrom
rip-glorious-hood
May 27, 2026
Merged

Rip glorious hood#345
SyntaxBreak merged 2 commits into
mainfrom
rip-glorious-hood

Conversation

@SyntaxBreak

Copy link
Copy Markdown
Contributor

rest in peace, you had a good run.

@SyntaxBreak SyntaxBreak linked an issue May 22, 2026 that may be closed by this pull request
@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown

Greptile Summary

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.

Comments Outside Diff (1)

  1. components/leds.py, line 40-45 (link)

    P1 LED animation never applied after hood removal

    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.

Reviews (1): Last reviewed commit: "make led just rainbow instead" | Re-trigger Greptile

@rafzip

rafzip commented May 23, 2026

Copy link
Copy Markdown
Collaborator

i'll fix today

@SyntaxBreak SyntaxBreak merged commit 34427c8 into main May 27, 2026
6 of 7 checks passed
@SyntaxBreak SyntaxBreak deleted the rip-glorious-hood branch May 27, 2026 08:21
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.

completely disable hood

2 participants