Skip to content

Commit

Permalink
blink rate and color tweaks after testing on real hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
gerth2 committed Dec 28, 2023
1 parent 81a79a2 commit bf4c2dd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private HardwareManager(HardwareConfig hardwareConfig, HardwareSettings hardware
: null;

if (statusLED != null) {
TimedTaskManager.getInstance().addTask("StatusLEDUpdate", this::statusLEDUpdate, 200);
TimedTaskManager.getInstance().addTask("StatusLEDUpdate", this::statusLEDUpdate, 150);
}

var hasBrightnessRange = hardwareConfig.ledBrightnessRange.size() == 2;
Expand Down Expand Up @@ -187,7 +187,7 @@ public void setRunning(boolean isRunning) {

private void statusLEDUpdate() {
// make blinky
boolean blinky = ((blinkCounter % 2) == 0);
boolean blinky = ((blinkCounter % 3) > 0);

// check if any pipeline has a visible target
boolean anyTarget = false;
Expand All @@ -200,16 +200,16 @@ private void statusLEDUpdate() {
if (this.systemRunning) {
if (!this.ntConnected) {
if (anyTarget) {
// alternate blue/yellow
statusLED.setRGB(blinky, blinky, !blinky);
// Blue Flashing
statusLED.setRGB(false, false, blinky);
} else {
// Yellow flashing
statusLED.setRGB(blinky, blinky, false);
}
} else {
if (anyTarget) {
// alternate blue/green
statusLED.setRGB(false, blinky, !blinky);
// Blue
statusLED.setRGB(false, false, blinky);
} else {
// blinky green
statusLED.setRGB(false, blinky, false);
Expand Down

0 comments on commit bf4c2dd

Please sign in to comment.