Skip to content

Commit

Permalink
Fix broken connection indication and build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
AronHetLam committed Jan 21, 2024
1 parent 22bf3bf commit 5143ac6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
23 changes: 12 additions & 11 deletions ATEM_tally_light/ATEM_tally_light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,17 +409,6 @@ void loop() {
for (int i = 0; i < tallySources; i++) {
tallyServer.setTallyFlag(i, atemSwitcher.getTallyByIndexTallyFlags(i));
}

//Switch state if ATEM connection is lost...
if (!atemSwitcher.isConnected()) { // will return false if the connection was lost
Serial.println("------------------------");
Serial.println("Connection to Switcher lost...");
changeState(STATE_CONNECTING_TO_SWITCHER);

//Reset tally server's tally flags, so clients turn off their lights.
tallyServer.resetTallyFlags();
}

#endif

//Handle Tally Server
Expand All @@ -433,6 +422,18 @@ void loop() {
color = getLedColor(settings.tallyModeLED2, settings.tallyNo);
setLED2(color);

#ifndef TALLY_TEST_SERVER
//Switch state if ATEM connection is lost...
if (!atemSwitcher.isConnected()) { // will return false if the connection was lost
Serial.println("------------------------");
Serial.println("Connection to Switcher lost...");
changeState(STATE_CONNECTING_TO_SWITCHER);

//Reset tally server's tally flags, so clients turn off their lights.
tallyServer.resetTallyFlags();
}
#endif

//Commented out for userst without batteries - Also timer is not done properly
// batteryLoop();
break;
Expand Down
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

[platformio]
default_envs = ESP8266, ESP8266_test_server, ESP32, ESP32_test_server, ESP32_C3, ESP32_S2, ESP32_S3, ESP32_C3_test_server, ESP32_S2_test_server, ESP32_S3_test_server
src_dir = $PROJECT_DIR/ATEM_tally_light
lib_dir = $PROJECT_DIR/libraries
src_dir = ${PROJECT_DIR}/ATEM_tally_light
lib_dir = ${PROJECT_DIR}/libraries

[env]
framework = arduino
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
platformio==6.1.11
platformio==6.1.13

0 comments on commit 5143ac6

Please sign in to comment.