From bda380513addbb6d69b1aaf287876225193f240e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 1 Jun 2020 17:02:49 -0500 Subject: [PATCH] Add valid() to recovery.info --- Marlin/src/feature/powerloss.h | 4 +++- Marlin/src/gcode/feature/powerloss/M1000.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index ff3fef80fa..affa2cae44 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -106,6 +106,8 @@ typedef struct { uint8_t valid_foot; + bool valid() { return valid_head && valid_head == valid_foot; } + } job_recovery_info_t; class PrintJobRecovery { @@ -164,7 +166,7 @@ class PrintJobRecovery { } #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) static void debug(PGM_P const prefix); diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index dbcd819d70..c53e8fbccc 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -41,7 +41,7 @@ inline void plr_error(PGM_P const prefix) { #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) DEBUG_ECHO_START(); serialprintPGM(prefix); - DEBUG_ECHOLNPGM(" Power-Loss Recovery Data"); + DEBUG_ECHOLNPGM(" Job Recovery Data"); #else UNUSED(prefix); #endif