This commit is contained in:
2026-02-11 08:58:16 +01:00
parent 9b65dbbdc9
commit a4cb46db62
2 changed files with 3 additions and 39 deletions
+2 -38
View File
@@ -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();
}