Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
meow
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsVistaisCool committed Nov 1, 2024
1 parent 0f508dd commit 427173e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/frc/robot/commands/EnableRobot.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public void initialize() {
readyToEnable = true;
hasEnabled = true;

// buttons.setEnableState(false);
buttons.setAllLow();
buttons.setLock(false);
}

@Override
Expand All @@ -59,6 +60,7 @@ public void end(boolean interrupted) {
if (!DriverStation.isEnabled()) {
led.set(new Solid(RGBConstruct.RED)).schedule();
}
buttons.setLock(true);
}).schedule();
}

Expand Down
11 changes: 9 additions & 2 deletions src/main/java/frc/robot/subsystems/ButtonControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,15 @@ public boolean getEnableState() {
return buttonsEnabled;
}

public void setEnableState(boolean state) {
buttonsEnabled = state;
public void setAllLow() {
red.setOverrideState(ButtonOverrideState.OVERRIDE_LOW);
yellow.setOverrideState(ButtonOverrideState.OVERRIDE_LOW);
green.setOverrideState(ButtonOverrideState.OVERRIDE_LOW);
greenTop.setOverrideState(ButtonOverrideState.OVERRIDE_LOW);
}

public void setLock(boolean lockEnabled) {
buttonsEnabled = !lockEnabled;

if (buttonsEnabled) {
red.setOverrideState(ButtonOverrideState.NORMAL);
Expand Down

0 comments on commit 427173e

Please sign in to comment.