From 5da3f92940e1678eb5bfcfbf4112663fda2f7704 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 15 Dec 2024 10:00:05 -0500 Subject: [PATCH] Don't pad eSPI displays when already full --- src/displays/DisplayTFT_eSPI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/displays/DisplayTFT_eSPI.cpp b/src/displays/DisplayTFT_eSPI.cpp index cc49867..998268c 100644 --- a/src/displays/DisplayTFT_eSPI.cpp +++ b/src/displays/DisplayTFT_eSPI.cpp @@ -345,8 +345,10 @@ void LcdDisplay::printState(){ // Because of the way we're updating the display, we need to clear out everything to the right of the status // string - std::string spaces(20 - printed_chars, ' '); - printAtMonoChars(printed_chars, 3, spaces.c_str()); + if(printed_chars < 20) { + std::string spaces(20 - printed_chars, ' '); + printAtMonoChars(printed_chars, 3, spaces.c_str()); + } }