Skip to content

Commit

Permalink
improve LED Command names
Browse files Browse the repository at this point in the history
  • Loading branch information
kytpbs committed May 28, 2024
1 parent 72d6b1d commit fda83ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/frc/utils/BetterLED.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void blink(Color color, int blinkCount) {
Timer.delay(0.5);
},
blinkCount,
"blink " + blinkCount + " times"));
"blink %d times".formatted(blinkCount)));
}

public void blink(Color color, double delaySeconds) {
Expand All @@ -176,7 +176,7 @@ public void blink(Color color, double delaySeconds) {
Timer.delay(delaySeconds);
},
true,
"blink infinitely"));
"blink %s infinitely".formatted(color.toString())));
}

public void blink(Color color) {
Expand Down Expand Up @@ -207,7 +207,7 @@ public void breathe(Color color, double delayTime, int max, int min) {
}
},
true,
"breath"));
"breath %s".formatted(color.toString())));
}

public void breathe(Color color, double delayTime) {
Expand Down Expand Up @@ -301,7 +301,7 @@ private LEDCommand createLeftToRightAnimationLoop(Color color, int onLEDCount) {
Timer.delay(0.1);
},
true,
"Left To Right");
"Left To Right %s".formatted(color.toString()));
}

private LEDCommand createRightToLeftAnimationLoop(Color color, int onLEDCount) {
Expand All @@ -320,12 +320,12 @@ private LEDCommand createRightToLeftAnimationLoop(Color color, int onLEDCount) {
Timer.delay(0.1);
},
true,
"Right to Left");
"Right to Left %s".formatted(color.toString()));
}

public String getCurrentCommandName() {
if (commandList.isEmpty()) {
return "Stopped";
return "No Command Running";
}
return commandList.get(0).toString();
}
Expand Down

0 comments on commit fda83ec

Please sign in to comment.