Big subsystem rework#36
Open
aidenzhang21345 wants to merge 73 commits into
Open
Conversation
…ystems that we previously had in periodic, now all done with triggers and commands.
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…nds from being cancelled
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
…o logic-clean-experimentation
hc-45
approved these changes
May 2, 2026
…o logic-clean-experimentation
… alignment command
…o logic-clean-experimentation
…t with boolean primitive
…nothing during shooting
…o logic-clean-experimentation
…iggered so it gets cancelled when shooting stops
…o logic-clean-experimentation
…o logic-clean-experimentation
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.
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.