Signal SD completion later (#21840)
This commit is contained in:
committed by
Scott Lahteine
parent
83309c1ac8
commit
c5c8ef436c
@@ -54,6 +54,7 @@
|
||||
#include "../../module/printcounter.h"
|
||||
#include "../../libs/duration_t.h"
|
||||
#include "../../HAL/shared/Delay.h"
|
||||
#include "../../MarlinCore.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
@@ -106,9 +107,6 @@ namespace ExtUI {
|
||||
#if ENABLED(JOYSTICK)
|
||||
uint8_t jogging : 1;
|
||||
#endif
|
||||
#if ENABLED(SDSUPPORT)
|
||||
uint8_t was_sd_printing : 1;
|
||||
#endif
|
||||
} flags;
|
||||
|
||||
#ifdef __SAM3X8E__
|
||||
@@ -1017,27 +1015,17 @@ namespace ExtUI {
|
||||
void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); }
|
||||
|
||||
void printFile(const char *filename) {
|
||||
UNUSED(filename);
|
||||
TERN_(SDSUPPORT, card.openAndPrintFile(filename));
|
||||
TERN(SDSUPPORT, card.openAndPrintFile(filename), UNUSED(filename));
|
||||
}
|
||||
|
||||
bool isPrintingFromMediaPaused() {
|
||||
return TERN0(SDSUPPORT, isPrintingFromMedia() && !IS_SD_PRINTING());
|
||||
return TERN0(SDSUPPORT, isPrintingFromMedia() && printingIsPaused());
|
||||
}
|
||||
|
||||
bool isPrintingFromMedia() {
|
||||
#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 isPrintingFromMedia() { return IS_SD_PRINTING(); }
|
||||
|
||||
bool isPrinting() {
|
||||
return (commandsInQueue() || isPrintingFromMedia() || TERN0(SDSUPPORT, IS_SD_PRINTING())) || print_job_timer.isRunning() || print_job_timer.isPaused();
|
||||
return commandsInQueue() || isPrintingFromMedia() || printJobOngoing() || printingIsPaused();
|
||||
}
|
||||
|
||||
bool isPrintingPaused() {
|
||||
|
Reference in New Issue
Block a user