From 4b3797f4fcd2bea295d0130949c0b9e0332351c8 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Sun, 10 Jan 2021 16:30:53 +0100 Subject: [PATCH] Moved individual calls to node->draw() or corner->draw() to a single central call to show_all. --- src/main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 045e23a..e7b1d87 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -217,7 +217,6 @@ void loop() { corner->infect(300, 600); } looping |= !corner->is_finished(); - corner->draw(); } if (random8(128)==0) { @@ -231,7 +230,6 @@ void loop() { for(Node* node : nodes) { node->step(); node->infect(512); - node->draw(); } if (random8(128)==0) { @@ -245,7 +243,6 @@ void loop() { for (Node* node : nodes) { node->step(); node->infect(512); - node->draw(); } if (millis() / 1000 > last_loop / 1000) { @@ -255,21 +252,17 @@ void loop() { } else if (active_mode == AM_OFF || active_mode == AM_STATIC) { for(Node* node : nodes) { node->set_color(active_mode == AM_OFF ? CRGB::Black : color); - node->draw(); } } else { // This includes AM_ERROR for(Node* node : nodes) { node->set_color(CRGB::Black); } nodes[0]->set_color(CRGB::Red); - for(Node* node : nodes) { - node->draw(); - } } last_loop = millis(); } #endif - FastLED.show(); + show_all(); } \ No newline at end of file