From a4cb46db629c34f86ce15620d32d99f0f8b9180c Mon Sep 17 00:00:00 2001 From: gitProtogen Date: Wed, 11 Feb 2026 08:58:16 +0100 Subject: [PATCH] idk --- config.h | 2 +- ledy.ino | 40 ++-------------------------------------- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/config.h b/config.h index 79901af..d84d288 100644 --- a/config.h +++ b/config.h @@ -8,7 +8,7 @@ #define DISPLAY_MAX_Y PANEL_PIXEL_COUNT - 1 #define TEXT_MAX_LENGTH 64 -#define MAX_MULTI_COLOR_TEXT_NODES_COUNT $ +#define MAX_MULTI_COLOR_TEXT_NODES_COUNT 4 #define MAX_TEXT_NODES_COUNT 4 #define MAX_IMAGES_SAVED 2 #define MAX_ANIMATION_FRAME_COUNT 12 diff --git a/ledy.ino b/ledy.ino index b897162..262100c 100644 --- a/ledy.ino +++ b/ledy.ino @@ -24,8 +24,6 @@ bool main_animation_started = false; unsigned char bottom_text_state = 0; // 0 = "Technik informatyk", 1 = "technik programista" unsigned char scroll_node_global_id = 0; // tracks current bottom-row node bool scroll_node_active = false; -unsigned long main_animation_start_time = 0; -bool example_animation_triggered = false; Image saved_images[MAX_IMAGES_SAVED] = { {},{} @@ -399,30 +397,6 @@ void stopAnimation(unsigned char index) animations[index].is_playing = false; } -void displayExampleSlideAnimation() -{ - if (!animations[0].is_playing) return; - - short offset_x = (DISPLAY_MAX_X + 1) - (short)animations[0].current_frame * 2; - - for (unsigned char y = 0; y < PANEL_PIXEL_COUNT; y++) - { - for (unsigned char bx = 0; bx < PANEL_PIXEL_COUNT; bx++) - { - short px = offset_x + bx; - if (px < 0 || px > DISPLAY_MAX_X) continue; - - unsigned char r, g, b; - if (y < 4) { r = 50; g = 0; b = 0; } - else if (y < 8) { r = 0; g = 50; b = 0; } - else if (y < 12) { r = 0; g = 0; b = 50; } - else { r = 50; g = 25; b = 0; } - - setPixel(px, y, pixels.Color(r, g, b)); - } - } -} - void handleDisappearTimers() { for (unsigned char i = 0; i < MAX_TEXT_NODES_COUNT; i++) @@ -497,7 +471,6 @@ void loop() if (!isNodeExistingByGlobal(0) && !isNodeExistingByGlobal(1)) { main_animation_started = true; - main_animation_start_time = millis(); // Top row: "Witamy w PTI" — slow scroll, repeating, white + blue PTI addNewMultiColor("Witamy w PTI", @@ -516,13 +489,13 @@ void loop() if (bottom_text_state == 0) { node = addNewTextNode("Technik informatyk + ai, robotyka", - pixels.Color(0, 0, 50), // blue (dimmed) + pixels.Color(0, 0, 50) false, DISPLAY_MAX_X, 9, 1, true, true, -1, false); } else { node = addNewTextNode("technik programista", - pixels.Color(50, 40, 0), // gold (dimmed) + pixels.Color(50, 40, 0), false, DISPLAY_MAX_X, 9, 1, true, true, -1, false); } if (node != nullptr) @@ -533,20 +506,11 @@ void loop() } } - if (main_animation_started && !example_animation_triggered && millis() - main_animation_start_time > 15000) - { - example_animation_triggered = true; - animations[0].frame_count = 32; - playAnimation(0, 3, false); - } - pixels.clear(); handle_server(); handleDisappearTimers(); handleMultiColorDisappearTimers(); scrollAllScrollableTexts(true); scrollAllMultiColorTexts(true); - tickAnimations(); - displayExampleSlideAnimation(); pixels.show(); } \ No newline at end of file