Skip to content

Commit

Permalink
fix auto not runing
Browse files Browse the repository at this point in the history
  • Loading branch information
StewardHail3433 committed Mar 23, 2024
1 parent 2cc9b12 commit 0a6fdac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/frc/robot/controls/DriverControls.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ public static void setupMainControls(CommandXboxController mainController) {
));

BooleanEvent stateChangedEvent =
new BooleanEvent(eventLoop, () -> DevilBotState.stateChanged());
new BooleanEvent(
eventLoop,
() -> (DevilBotState.stateChanged()) && DevilBotState.getState() != State.AUTO);

Trigger stateChangedEventTrigger = stateChangedEvent.rising().castTo(Trigger::new);
stateChangedEventTrigger.onTrue(getResetSubsystemsCommand());
Expand Down

0 comments on commit 0a6fdac

Please sign in to comment.