Skip to content

Commit

Permalink
Don't pad eSPI displays when already full
Browse files Browse the repository at this point in the history
  • Loading branch information
thorrak committed Dec 15, 2024
1 parent a3c454b commit 5da3f92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/displays/DisplayTFT_eSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}


Expand Down

0 comments on commit 5da3f92

Please sign in to comment.