Add valid() to recovery.info
This commit is contained in:
parent
e380498512
commit
bda380513a
|
@ -106,6 +106,8 @@ typedef struct {
|
||||||
|
|
||||||
uint8_t valid_foot;
|
uint8_t valid_foot;
|
||||||
|
|
||||||
|
bool valid() { return valid_head && valid_head == valid_foot; }
|
||||||
|
|
||||||
} job_recovery_info_t;
|
} job_recovery_info_t;
|
||||||
|
|
||||||
class PrintJobRecovery {
|
class PrintJobRecovery {
|
||||||
|
@ -164,7 +166,7 @@ class PrintJobRecovery {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline bool valid() { return info.valid_head && info.valid_head == info.valid_foot; }
|
static inline bool valid() { return info.valid(); }
|
||||||
|
|
||||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||||
static void debug(PGM_P const prefix);
|
static void debug(PGM_P const prefix);
|
||||||
|
|
|
@ -41,7 +41,7 @@ inline void plr_error(PGM_P const prefix) {
|
||||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||||
DEBUG_ECHO_START();
|
DEBUG_ECHO_START();
|
||||||
serialprintPGM(prefix);
|
serialprintPGM(prefix);
|
||||||
DEBUG_ECHOLNPGM(" Power-Loss Recovery Data");
|
DEBUG_ECHOLNPGM(" Job Recovery Data");
|
||||||
#else
|
#else
|
||||||
UNUSED(prefix);
|
UNUSED(prefix);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue