Skip to content

Commit

Permalink
Merge pull request #705 from OpenEVSE/jeremypoulter/issue597
Browse files Browse the repository at this point in the history
Changes to block until the LCD update has completed if the `LCD_DISPLAY_NOW` is set
  • Loading branch information
glynhudson authored Aug 30, 2023
2 parents 888c5c4 + e2d36f1 commit 8ab2855
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void LcdTask::display(Message *msg, uint32_t flags)
_tail = msg;

if(flags & LCD_DISPLAY_NOW) {
MicroTask.wakeTask(this);
displayNextMessage();
}
}

Expand Down Expand Up @@ -704,7 +704,7 @@ void LcdTask::displayNameValue(int line, const char *name, const char *value)

void LcdTask::showText(int x, int y, const char *msg, bool clear)
{
DBUGF("LCD: %d %d %s", x, y, msg);
DBUGF("LCD: %d %d %s, clear=%s", x, y, msg, clear ? "true" : "false");
_evse->getOpenEVSE().lcdDisplayText(x, y, msg, IGNORE);
if(clear)
{
Expand All @@ -715,6 +715,9 @@ void LcdTask::showText(int x, int y, const char *msg, bool clear)
_evse->getOpenEVSE().lcdDisplayText(i, y, " ", IGNORE);
}
}

// HACK: wait for the display to finish, fixes issues withupdating the display wile updating the firmware
_evse->getSender().flush();
}

void LcdTask::onButton(int long_press)
Expand Down

0 comments on commit 8ab2855

Please sign in to comment.