|
@ -126,8 +126,6 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*= |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// Did Z change since the last call?
|
|
|
// Did Z change since the last call?
|
|
|
const float zmoved = current_position[Z_AXIS] - info.current_position[Z_AXIS]; |
|
|
|
|
|
|
|
|
|
|
|
if (force |
|
|
if (force |
|
|
#if DISABLED(SAVE_EACH_CMD_MODE) // Always save state when enabled
|
|
|
#if DISABLED(SAVE_EACH_CMD_MODE) // Always save state when enabled
|
|
|
#if PIN_EXISTS(POWER_LOSS) // Save if power loss pin is triggered
|
|
|
#if PIN_EXISTS(POWER_LOSS) // Save if power loss pin is triggered
|
|
@ -136,8 +134,8 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*= |
|
|
#if SAVE_INFO_INTERVAL_MS > 0 // Save if interval is elapsed
|
|
|
#if SAVE_INFO_INTERVAL_MS > 0 // Save if interval is elapsed
|
|
|
|| ELAPSED(ms, next_save_ms) |
|
|
|| ELAPSED(ms, next_save_ms) |
|
|
#endif |
|
|
#endif |
|
|
|| zmoved > 0 // Z moved up (including Z-hop)
|
|
|
// Save every time Z is higher than the last call
|
|
|
|| zmoved < -5 // Z moved down a lot (for some reason)
|
|
|
|| current_position[Z_AXIS] > info.current_position[Z_AXIS] |
|
|
#endif |
|
|
#endif |
|
|
) { |
|
|
) { |
|
|
|
|
|
|
|
@ -375,8 +373,8 @@ void PrintJobRecovery::resume() { |
|
|
if (info.valid_head == info.valid_foot) { |
|
|
if (info.valid_head == info.valid_foot) { |
|
|
SERIAL_ECHOPGM("current_position: "); |
|
|
SERIAL_ECHOPGM("current_position: "); |
|
|
LOOP_XYZE(i) { |
|
|
LOOP_XYZE(i) { |
|
|
|
|
|
if (i) SERIAL_CHAR(','); |
|
|
SERIAL_ECHO(info.current_position[i]); |
|
|
SERIAL_ECHO(info.current_position[i]); |
|
|
if (i < E_AXIS) SERIAL_CHAR(','); |
|
|
|
|
|
} |
|
|
} |
|
|
SERIAL_EOL(); |
|
|
SERIAL_EOL(); |
|
|
SERIAL_ECHOLNPAIR("feedrate: ", info.feedrate); |
|
|
SERIAL_ECHOLNPAIR("feedrate: ", info.feedrate); |
|
|