From f62e6793c56d5569440f6125cd07417c80e6de0a Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 25 Aug 2020 12:08:18 -0700 Subject: [PATCH] Fix #333 screens were redrawing when they should not thanks @drewsed for the clear report - made it easy to repro/fix due to refactoring/cleanup a couple of weeks back --- src/graphics/Screen.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index ca0995c65..281737560 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -819,14 +819,16 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg) // DEBUG_MSG("Screen got status update %d\n", arg->getStatusType()); switch (arg->getStatusType()) { case STATUS_TYPE_NODE: - if (nodeDB.updateTextMessage || nodeStatus->getLastNumTotal() != nodeStatus->getNumTotal()) - setFrames(); - prevFrame = -1; + if (nodeDB.updateTextMessage || nodeStatus->getLastNumTotal() != nodeStatus->getNumTotal()) { + setFrames(); // Regen the list of screens + prevFrame = -1; // Force a GUI update + setPeriod(1); // Update the screen right away + } nodeDB.updateGUI = false; nodeDB.updateTextMessage = false; break; } - setPeriod(1); // Update the screen right away + return 0; } } // namespace graphics