Skip to content
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

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Change all the run to runOnce #90

wants to merge 6 commits into from

Conversation

rakrakon
Copy link
Contributor

  • 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())
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

@rakrakon rakrakon Nov 27, 2024

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :)

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.

Potential Cause of Command Scheduler Overruns: Repeated Execution Of Commands?
2 participants