From 7463cb31f0ac6c59e3932094b3868e4bd6bc3ce2 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sun, 8 Dec 2024 00:51:28 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BE=20perfect=20loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/main.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index c75bf28..a660d5e 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -66,7 +66,7 @@ enum DisplayStyle { Congress }; -Mode mode = Stealth; +Mode mode = HighVis; DisplayStyle style = Congress; void setup(){ @@ -163,7 +163,7 @@ void draw_rain() { } } -int running_text_pos = 7; +int running_text_pos = 21; void draw_congress() { matrix->fillScreenRGB888(15, 0, 10); @@ -192,13 +192,19 @@ void draw_congress() { matrix->print("Panki"); } else if (mode == HighVis) { matrix->setCursor(running_text_pos, 21); - String message = "38C3 - Panki - DECT 3389 - ALL YOUR BASE ARE BELONG TO US"; + String message = "38C3 - Panki - DECT - 3389 - 38C3"; matrix->print(message); + if ((running_text_pos == 7) or (running_text_pos == - 70) or (running_text_pos == -146 ) or (running_text_pos == -216) ) { + delay(2000); + } running_text_pos -= 1; - if (running_text_pos < -936) { // (0 - (13 * message.length()))) { - running_text_pos = 63; + + if (running_text_pos < - 286 ) { // (0 - (13 * message.length()))) { + running_text_pos = 7; }; - delay(75); + matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); + matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); + delay(10); } }