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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen756 committed Feb 24, 2024
2 parents 1b14474 + f6f3542 commit 933048b
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/main/java/frc/robot/lights/LightsSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public void robotPeriodic() {
lightsOnExit = Optional.of(previousState.lightsOnExit.get());
}

if (lightsOnExitTimer.hasElapsed(1.5)) {
if (lightsOnExitTimer.hasElapsed(0.5)) {
lightsOnExit = Optional.empty();
lightsOnExitTimer.reset();
lightsOnExitTimer.stop();
lightsOnExitTimer.reset();
}

if (lightsOnExit.isPresent()) {
Expand Down Expand Up @@ -112,23 +112,17 @@ public void robotPeriodic() {
offDuration = SLOW_BLINK_DURATION * 2;
}

if (state.color() == Color.kWhite) {
LimelightHelpers.setLEDMode_ForceBlink("");
} else {
LimelightHelpers.setLEDMode_ForceOff("");
}

if (time >= offDuration) {
blinkTimer.reset();
candle.setLEDs(0, 0, 0);

if (state.color() != Color.kWhite) {
LimelightHelpers.setLEDMode_ForceOff("");

// do the limelight blinky stuff (turned off)
}

} else if (time >= onDuration) {
candle.setLEDs(color8Bit.red, color8Bit.green, color8Bit.blue);

if (state.color() == Color.kWhite) {
LimelightHelpers.setLEDMode_ForceBlink("");
// do the limelight blinky stuff (turned on)
}
}
}

Expand Down

0 comments on commit 933048b

Please sign in to comment.