Make M600 happy

This commit is contained in:
InsanityAutomation
2020-12-13 12:41:50 -05:00
parent dd42b65980
commit 92c60cd22e
2 changed files with 13 additions and 13 deletions
+11 -11
View File
@@ -84,7 +84,7 @@ bool hasPrintTimer = false;
void onPrintTimerPaused() {
// Handle M28 Pause SD print - But only if we're not waiting on a user
if (ExtUI::isPrintingFromMediaPaused() && ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_PRINT_RUNNING) {
if (ExtUI::isPrintingFromMediaPaused() && ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_PRINT_RUNNING && !ExtUI::isWaitingOnUser()) {
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_PRINT_PAUSED);
}
}
@@ -112,20 +112,20 @@ bool hasPrintTimer = false;
ScreenHandler.setstatusmessagePGM(msg);
ScreenHandler.sendinfoscreen(PSTR("Confirmation required"), msg, NUL_STR, NUL_STR, true, true, false, true);
if (hasPrintTimer) {
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_PRINT_PAUSED);
} else {
//if (hasPrintTimer) {
// ScreenHandler.GotoScreen(DGUSLCD_SCREEN_PRINT_PAUSED);
//} else {
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POPUP);
}
// }
}
else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP) {
DEBUG_ECHOLNPAIR("User confirmation canceled");
//else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP) {
// DEBUG_ECHOLNPAIR("User confirmation canceled");
ScreenHandler.setstatusmessagePGM(nullptr);
ScreenHandler.PopToOldScreen();
}
// ScreenHandler.setstatusmessagePGM(nullptr);
// ScreenHandler.PopToOldScreen();
// }
while (!ScreenHandler.loop()); // Wait while anything is left to be sent
//while (!ScreenHandler.loop()); // Wait while anything is left to be sent
}
void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); }
@@ -1129,11 +1129,11 @@ bool DGUSScreenHandler::loop() {
const millis_t ms = millis();
static millis_t next_event_ms = 0;
if (wait_for_user && current_screen != DGUSLCD_SCREEN_POPUP) {
if (ExtUI::isWaitingOnUser() && current_screen != DGUSLCD_SCREEN_POPUP) {
// In some occassions the display needs more time to handle a screen change, for instance,
// with ADVANCED_PAUSE_FEATURE, the calls to ExtUI::onUserConfirmRequired are quite fast
DEBUG_ECHOLN("Nudging the display to update the current screen...");
GotoScreen(current_screen, true);
GotoScreen(DGUSLCD_SCREEN_PRINT_PAUSED, true);
}
if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) {