Skip to content

Commit 5da3f92

Browse files
committed
Don't pad eSPI displays when already full
1 parent a3c454b commit 5da3f92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/displays/DisplayTFT_eSPI.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,10 @@ void LcdDisplay::printState(){
345345

346346
// Because of the way we're updating the display, we need to clear out everything to the right of the status
347347
// string
348-
std::string spaces(20 - printed_chars, ' ');
349-
printAtMonoChars(printed_chars, 3, spaces.c_str());
348+
if(printed_chars < 20) {
349+
std::string spaces(20 - printed_chars, ' ');
350+
printAtMonoChars(printed_chars, 3, spaces.c_str());
351+
}
350352
}
351353

352354

0 commit comments

Comments
 (0)