Skip to content

Commit

Permalink
adding on the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
AraucariaA committed Dec 4, 2023
1 parent 91186ae commit 36818fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/java/org/tvhsfrc/frc2023/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ private void configureBindings() {
// ------ Driving ------ //
controller.touchpad().onTrue(new InstantCommand(swerve::zeroGyro));

CommandBase cSetRainbow = Commands.runOnce(() -> leds.setState(Colors.RAINBOW), leds);
CommandBase cSetGreen = Commands.runOnce(() -> leds.setState(Colors.GREEN), leds);
CommandBase cSetBlue = Commands.runOnce(() -> leds.setState(Colors.BLUE), leds);
CommandBase cSetOff = Commands.runOnce(() -> leds.setState(Colors.OFF), leds);

CommandBase cSetRainbow = Commands.runOnce(() -> leds.setState(Colors.RAINBOW), leds).ignoringDisable(true);
CommandBase cSetGreen = Commands.runOnce(() -> leds.setState(Colors.GREEN), leds).ignoringDisable(true);
CommandBase cSetBlue = Commands.runOnce(() -> leds.setState(Colors.BLUE), leds).ignoringDisable(true);
CommandBase cSetOff = Commands.runOnce(() -> leds.setState(Colors.OFF), leds).ignoringDisable(true);

controller.povDown().onTrue(cSetOff);
controller.povLeft().onTrue(cSetGreen);
controller.povRight().onTrue(cSetBlue);
controller.povUp().onTrue(cSetRainbow);

RelativeRelativeDrive drive =
new RelativeRelativeDrive(
Expand Down

0 comments on commit 36818fd

Please sign in to comment.