Skip to content

Commit 8ab2855

Browse files
authored
Merge pull request #705 from OpenEVSE/jeremypoulter/issue597
Changes to block until the LCD update has completed if the `LCD_DISPLAY_NOW` is set
2 parents 888c5c4 + e2d36f1 commit 8ab2855

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lcd.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void LcdTask::display(Message *msg, uint32_t flags)
7777
_tail = msg;
7878

7979
if(flags & LCD_DISPLAY_NOW) {
80-
MicroTask.wakeTask(this);
80+
displayNextMessage();
8181
}
8282
}
8383

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

705705
void LcdTask::showText(int x, int y, const char *msg, bool clear)
706706
{
707-
DBUGF("LCD: %d %d %s", x, y, msg);
707+
DBUGF("LCD: %d %d %s, clear=%s", x, y, msg, clear ? "true" : "false");
708708
_evse->getOpenEVSE().lcdDisplayText(x, y, msg, IGNORE);
709709
if(clear)
710710
{
@@ -715,6 +715,9 @@ void LcdTask::showText(int x, int y, const char *msg, bool clear)
715715
_evse->getOpenEVSE().lcdDisplayText(i, y, " ", IGNORE);
716716
}
717717
}
718+
719+
// HACK: wait for the display to finish, fixes issues withupdating the display wile updating the firmware
720+
_evse->getSender().flush();
718721
}
719722

720723
void LcdTask::onButton(int long_press)

0 commit comments

Comments
 (0)