diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 75ac03f00c..5a25710084 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -581,9 +581,10 @@ void PrintJobRecovery::resume() { DEBUG_ECHOLNPGM("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : ""); #if ENABLED(GCODE_REPEAT_MARKERS) - DEBUG_ECHOLNPGM("repeat index: ", info.stored_repeat.index); - for (uint8_t i = 0; i < info.stored_repeat.index; ++i) - DEBUG_ECHOLNPGM("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter); + const uint8_t ind = info.stored_repeat.count(); + DEBUG_ECHOLNPGM("repeat markers: ", ind); + for (uint8_t i = ind; i--;) + DEBUG_ECHOLNPGM("...", i, " sdpos: ", info.stored_repeat.get_marker_sdpos(i), " count: ", info.stored_repeat.get_marker_counter(i)); #endif #if HAS_HOME_OFFSET diff --git a/Marlin/src/feature/repeat.h b/Marlin/src/feature/repeat.h index 8a54149b3d..ce309f6470 100644 --- a/Marlin/src/feature/repeat.h +++ b/Marlin/src/feature/repeat.h @@ -48,6 +48,9 @@ public: static void add_marker(const uint32_t sdpos, const uint16_t count); static void loop(); static void cancel(); + static uint8_t count() { return index; } + static int16_t get_marker_counter(const uint8_t i) { return marker[i].counter; } + static uint32_t get_marker_sdpos(const uint8_t i) { return marker[i].sdpos; } }; extern Repeat repeat;