|
|
@ -66,9 +66,6 @@ PrintJobRecovery recovery; |
|
|
|
#ifndef POWER_LOSS_PURGE_LEN |
|
|
|
#define POWER_LOSS_PURGE_LEN 0 |
|
|
|
#endif |
|
|
|
#ifndef POWER_LOSS_ZRAISE |
|
|
|
#define POWER_LOSS_ZRAISE 2 // Move on loss with backup power, or on resume without it
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if DISABLED(BACKUP_POWER_SUPPLY) |
|
|
|
#undef POWER_LOSS_RETRACT_LEN // No retract at outage without backup power
|
|
|
@ -370,7 +367,7 @@ void PrintJobRecovery::resume() { |
|
|
|
|
|
|
|
//
|
|
|
|
// Home the axes that can safely be homed, and
|
|
|
|
// establish the current position as best we can
|
|
|
|
// establish the current position as best we can.
|
|
|
|
//
|
|
|
|
#if Z_HOME_DIR > 0 |
|
|
|
|
|
|
@ -380,7 +377,7 @@ void PrintJobRecovery::resume() { |
|
|
|
"G28R0" // Home all axes (no raise)
|
|
|
|
)); |
|
|
|
|
|
|
|
#else // "G92.9 E0 ..."
|
|
|
|
#else |
|
|
|
|
|
|
|
// If a Z raise occurred at outage restore Z, otherwise raise Z now
|
|
|
|
sprintf_P(cmd, PSTR("G92.9 E0 " TERN(BACKUP_POWER_SUPPLY, "Z%s", "Z0\nG1Z%s")), dtostrf(info.zraise, 1, 3, str_1)); |
|
|
@ -488,7 +485,7 @@ void PrintJobRecovery::resume() { |
|
|
|
gcode.process_subcommands_now_P(PSTR("G12")); |
|
|
|
#endif |
|
|
|
|
|
|
|
// Move back to the saved XY
|
|
|
|
// Move back over to the saved XY
|
|
|
|
sprintf_P(cmd, PSTR("G1X%sY%sF3000"), |
|
|
|
dtostrf(info.current_position.x, 1, 3, str_1), |
|
|
|
dtostrf(info.current_position.y, 1, 3, str_2) |
|
|
|