Improve Power-Loss Recovery (#19540)
This commit is contained in:
@@ -107,6 +107,12 @@ typedef struct {
|
||||
// Job elapsed time
|
||||
millis_t print_job_elapsed;
|
||||
|
||||
// Misc. Marlin flags
|
||||
struct {
|
||||
bool dryrun:1; // M111 S8
|
||||
bool allow_cold_extrusion:1; // M302 P1
|
||||
} flag;
|
||||
|
||||
uint8_t valid_foot;
|
||||
|
||||
bool valid() { return valid_head && valid_head == valid_foot; }
|
||||
@@ -173,7 +179,10 @@ class PrintJobRecovery {
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool valid() { return info.valid(); }
|
||||
// The referenced file exists
|
||||
static inline bool interrupted_file_exists() { return card.fileExists(info.sd_filename); }
|
||||
|
||||
static inline bool valid() { return info.valid() && interrupted_file_exists(); }
|
||||
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
static void debug(PGM_P const prefix);
|
||||
|
||||
Reference in New Issue
Block a user