Skip to content

Commit af12d48

Browse files
committed
Changes to block until the LCD update has completed if the LCD_DISPLAY_NOW is set
This fixes issues during firmware update where the incomming data also blocks the CPU and the LCD was not being updated, especcially over Ethernet as the data is received much faster than WiFI
1 parent ff55cf4 commit af12d48

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)