Improve Power-loss Recovery (#15135)

This commit is contained in:
Scott Lahteine
2019-09-10 18:52:41 -05:00
committed by GitHub
parent 75927e17dd
commit c590e8ac05
9 changed files with 87 additions and 32 deletions

View File

@@ -118,7 +118,7 @@ void GcodeSuite::get_destination_from_command() {
destination[i] = current_position[i];
}
#if ENABLED(POWER_LOSS_RECOVERY)
#if ENABLED(POWER_LOSS_RECOVERY) && !PIN_EXISTS(POWER_LOSS)
// Only update power loss recovery on moves with E
if (recovery.enabled && IS_SD_PRINTING() && seen[E_AXIS] && (seen[X_AXIS] || seen[Y_AXIS]))
recovery.save();
@@ -823,6 +823,10 @@ void GcodeSuite::process_next_command() {
PORT_REDIRECT(queue.port[queue.index_r]);
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.queue_index_r = queue.index_r;
#endif
if (DEBUGGING(ECHO)) {
SERIAL_ECHO_START();
SERIAL_ECHOLN(current_command);