From d93b283d2c0d7af6bbaac6c65c4f5aeada8ac573 Mon Sep 17 00:00:00 2001 From: Robin Cerny Date: Sat, 19 Apr 2025 06:39:17 +0200 Subject: [PATCH] shifted 'out' from the tapout screen one digit to the right --- ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino | 5 ++++- ROFLS_Arena_LED_Strip_Clock/LED_Driving_functions.ino | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino b/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino index 68edd40..460dab9 100644 --- a/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino +++ b/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino @@ -190,7 +190,7 @@ void sendTimeDisplay(int MINUTES, int SECONDS, int RED, int GREEN, int BLUE, int } } -// Global markers for tap out states (non‐blocking sequences) +// Global Vars for tap out states bool redTapOutActive = false; unsigned long redTapOutStartTime = 0; int redTapOutStage = 0; @@ -424,8 +424,10 @@ void handleCountdownTransition() { // The display update logic now considers all conditions in order. void updateDisplay() { if (ReadyCountDown.isRunning()) { + // Display Ready Countdown in Yellow sendTimeDisplay((ReadyCountDown.remaining()/60 % 60), (ReadyCountDown.remaining()%60), 255, 165, 0, CLOCK_LED_BRIGHTNESS); } else if (switchRUMBLE.on()) { + // Display the Rumble Timer sendTimeDisplay((rumbleTIME.elapsed()/60 % 60), (rumbleTIME.elapsed()%60), 0, 255, 255, CLOCK_LED_BRIGHTNESS); } else if (!FightCountDown.isRunning() && !countdownPAUSED) { // Choose green if both team buttons are active; otherwise, choose magenta. @@ -439,6 +441,7 @@ void updateDisplay() { if (countdownPAUSED && (!buttonREDTEAMvar || !buttonBLUETEAMvar)) { sendTimeDisplay((FightCountDown.remaining()/60 % 60), (FightCountDown.remaining()%60), 255, 165, 0, CLOCK_LED_BRIGHTNESS); } else { + // Display the countdown in green sendTimeDisplay((FightCountDown.remaining()/60 % 60), (FightCountDown.remaining()%60), 0, 255, 0, CLOCK_LED_BRIGHTNESS); } } diff --git a/ROFLS_Arena_LED_Strip_Clock/LED_Driving_functions.ino b/ROFLS_Arena_LED_Strip_Clock/LED_Driving_functions.ino index be007dc..adf0c8a 100644 --- a/ROFLS_Arena_LED_Strip_Clock/LED_Driving_functions.ino +++ b/ROFLS_Arena_LED_Strip_Clock/LED_Driving_functions.ino @@ -25,7 +25,9 @@ const int COLONArray [] = {224,225,226,227,228,229,230,231}; // tap out const int LitArrayTap [] = {0,1,2,3,4,5,6,7,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151}; -const int LitArrayOut [] = {0,1,2,3,4,5,6,7,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159}; +//const int LitArrayOut [] = {0,1,2,3,4,5,6,7,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159}; +const int LitArrayOut [] = {56,57,58,59,60,61,62,63,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215}; + // set digits of the timer/clock, use: setDIGIT(, , , , )