Touch UI additions, bug fixes (#17379)

This commit is contained in:
Marcio T
2020-04-02 13:24:55 -06:00
committed by GitHub
parent 11ce281694
commit be0e313c07
13 changed files with 364 additions and 18 deletions

View File

@@ -112,6 +112,9 @@ namespace ExtUI {
#if ENABLED(JOYSTICK)
uint8_t jogging : 1;
#endif
#if ENABLED(SDSUPPORT)
uint8_t was_sd_printing : 1;
#endif
} flags;
#ifdef __SAM3X8E__
@@ -1032,11 +1035,18 @@ namespace ExtUI {
}
bool isPrintingFromMedia() {
return IFSD(card.isFileOpen(), false);
#if ENABLED(SDSUPPORT)
// Account for when IS_SD_PRINTING() reports the end of the
// print when there is still SD card data in the planner.
flags.was_sd_printing = card.isFileOpen() || (flags.was_sd_printing && commandsInQueue());
return flags.was_sd_printing;
#else
return false;
#endif
}
bool isPrinting() {
return (planner.movesplanned() || isPrintingFromMedia() || IFSD(IS_SD_PRINTING(), false));
return (commandsInQueue() || isPrintingFromMedia() || IFSD(IS_SD_PRINTING(), false));
}
bool isMediaInserted() {