Skip to content

Big subsystem rework#36

Open
aidenzhang21345 wants to merge 73 commits into
mainfrom
logic-clean-experimentation
Open

Big subsystem rework#36
aidenzhang21345 wants to merge 73 commits into
mainfrom
logic-clean-experimentation

Conversation

@aidenzhang21345
Copy link
Copy Markdown
Collaborator

OVERVIEW:
Handoff and Feeder:
Remove logic in periodic for setting state to idle when not aligned in shooting and ferrying state, replace this logic with triggers in robot container.

Intake:
Remove stalling logic from periodic, replace it with triggers in robot container.

Swerve:
Added triggers for not aligned to hub and not aligned to ferry zone

Commands:
For state-setter commands (Handoff, Feeder, Intake, and Shooter), delete all individual state setter commands and instead make one class containing all commands, with each command being made by a command factory.
Similarly for vision make all previous commands part of the VisionCommands file, each one being a command factory.

The changes made to commands were just to be more concise and more readable.

The switch to triggers instead of logic in periodic was to avoid more complex logic being used every periodic cycle, and be more safe with the code by only using commands to control subsystems instead of using both periodic and outside commands to control states. Now the only thing the subsystem periodics do is set control to the motors.

It is important to note that the biggest concern here is to avoid controlling states within periodic, not necessarily other types of logic such as determining how to control the pivot motor itself based on its position and current state.

…ystems that we previously had in periodic, now all done with triggers and commands.
aidenzhang21345 and others added 16 commits May 2, 2026 15:16
…iggered so it gets cancelled when shooting stops
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.

4 participants