🧑💻 Handle PLR in manage_media
This commit is contained in:
committed by
Scott Lahteine
parent
7fa2dcedda
commit
f35404f853
@ -108,13 +108,18 @@ void PrintJobRecovery::changed() {
|
||||
*
|
||||
* If a saved state exists send 'M1000 S' to initiate job recovery.
|
||||
*/
|
||||
void PrintJobRecovery::check() {
|
||||
bool PrintJobRecovery::check() {
|
||||
//if (!card.isMounted()) card.mount();
|
||||
bool success = false;
|
||||
if (card.isMounted()) {
|
||||
load();
|
||||
if (!valid()) return cancel();
|
||||
queue.inject(F("M1000S"));
|
||||
success = valid();
|
||||
if (!success)
|
||||
cancel();
|
||||
else
|
||||
queue.inject(F("M1000S"));
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,11 +176,11 @@ class PrintJobRecovery {
|
||||
static void open(const bool read) { card.openJobRecoveryFile(read); }
|
||||
static void close() { file.close(); }
|
||||
|
||||
static void check();
|
||||
static bool check();
|
||||
static void resume();
|
||||
static void purge();
|
||||
|
||||
static void cancel() { purge(); IF_DISABLED(NO_SD_AUTOSTART, card.autofile_begin()); }
|
||||
static void cancel() { purge(); }
|
||||
|
||||
static void load();
|
||||
static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=POWER_LOSS_ZRAISE, const bool raised=false);
|
||||
|
Reference in New Issue
Block a user