-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change all the run
to runOnce
#90
base: dev
Are you sure you want to change the base?
Conversation
rakrakon
commented
Nov 20, 2024
- Convert everything to runOnce
- Convert everything to runOnce
- Add waitUntil in climb
- Rebase conflicts
- Rebase conflicts
…rruns # Conflicts: # src/main/kotlin/frc/robot/subsystems/climb/Climb.kt # src/main/kotlin/frc/robot/subsystems/conveyor/Conveyor.kt # src/main/kotlin/frc/robot/subsystems/hood/Hood.kt # src/main/kotlin/frc/robot/subsystems/shooter/Shooter.kt
@@ -107,7 +107,7 @@ object RobotContainer { | |||
driverController().back() | |||
.whileTrue(gripper.setRollerPower(0.4)) | |||
.onFalse(gripper.stop()) | |||
driverController().start().whileTrue(intake.reset()) | |||
driverController().start().whileTrue(intake.reset()).onFalse(intake.finishReset()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, intake.reset()
can use runEnd()
decorator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure what is the decorator you're referring to.
Also i think it doesn't matter that much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure what is the decorator you're referring to.
How lucky we are to have an API reference 🙃.
I think it's nice because otherwise you duplicate code, and this logic IMO should be in the subsystem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean a runend command? Otherwise I'm not really sure what you're referring to exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :)