Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to block until the LCD update has completed if the LCD_DISPLAY_NOW is set #705

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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