🐛 Fix DGUS displays compile (#22464)

This commit is contained in:
ellensp
2021-07-31 12:50:22 +12:00
committed by Scott Lahteine
parent 22ef6362ae
commit c753071961
8 changed files with 100 additions and 83 deletions

View File

@@ -42,6 +42,8 @@
#if ENABLED(SDSUPPORT)
static ExtUI::FileList filelist;
void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;
if (touched_nr > filelist.count()) return;
@@ -83,7 +85,7 @@
case 1: // Pause
GotoScreen(MKSLCD_SCREEN_PAUSE);
GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION);
if (!ExtUI::isPrintingFromMediaPaused()) {
ExtUI::pausePrint();
//ExtUI::mks_pausePrint();
@@ -409,8 +411,15 @@ bool DGUSScreenHandler::loop() {
if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid()))
booted = true;
if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT)))
if (!booted && ELAPSED(ms, BOOTSCREEN_TIMEOUT)) {
booted = true;
if (TERN0(POWER_LOSS_RECOVERY, recovery.valid()))
GotoScreen(DGUSLCD_SCREEN_POWER_LOSS);
else
GotoScreen(DGUSLCD_SCREEN_MAIN);
}
#endif
return IsScreenComplete();
}