Prevent interruption of TouchUI calibration screen

- Keep LCD messages from interrupting touch calibration wizard.
- Avoid corrupting the display list when this happens.
This commit is contained in:
Marcio Teixeira 2020-10-30 13:32:41 -06:00
parent 7eab6bd18e
commit bf5820cb0d
2 changed files with 11 additions and 0 deletions

View file

@ -301,6 +301,14 @@ void StatusScreen::setStatusMessage(progmem_str message) {
}
void StatusScreen::setStatusMessage(const char* message) {
if(CommandProcessor::is_processing()) {
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM("Cannot update status message, command processor busy");
#endif
return;
}
CommandProcessor cmd;
cmd.cmd(CMD_DLSTART)
.cmd(CLEAR_COLOR_RGB(Theme::bg_color))

View file

@ -85,6 +85,9 @@ void TouchCalibrationScreen::onRedraw(draw_mode_t) {
void TouchCalibrationScreen::onIdle() {
if (!CLCD::is_touching() && !CommandProcessor::is_processing()) {
GOTO_PREVIOUS();
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_MSG("Calibration routine finished");
#endif
}
}