Skip to content

Commit

Permalink
Make change to led light up
Browse files Browse the repository at this point in the history
  • Loading branch information
mg-1999 committed Oct 31, 2020
1 parent 4fa696a commit 04e1cbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

tallyarbiter-m5stickc/tallyarbiter-m5stickc.ino
4 changes: 2 additions & 2 deletions tallyarbiter-m5stickc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,9 @@ void processTallyData() {
if (getBusTypeById(JSON.stringify(DeviceStates[i]["busId"])) == "\"program\"") {
if (DeviceStates[i]["sources"].length() > 0) {
mode_program = true;
digitalWrite(led_program, LOW);
}
else {
mode_program = false;
digitalWrite(led_program, HIGH);
}
}
}
Expand Down Expand Up @@ -285,6 +283,7 @@ void SetDeviceName() {
void evaluateMode() {
M5.Lcd.setCursor(0, 30);
M5.Lcd.setTextSize(2);
digitalWrite(led_program, HIGH);

if (mode_preview && !mode_program) {
logger("The device is in preview.", "info-quiet");
Expand All @@ -295,6 +294,7 @@ void evaluateMode() {
logger("The device is in program.", "info-quiet");
M5.Lcd.setTextColor(BLACK);
M5.Lcd.fillScreen(RED);
digitalWrite(led_program, LOW);
}
else if (mode_preview && mode_program) {
logger("The device is in preview+program.", "info-quiet");
Expand Down

0 comments on commit 04e1cbc

Please sign in to comment.