Simplify PLR homing when Z homes to max (#13718)

This commit is contained in:
Robby Candra 2019-04-16 12:17:27 +07:00 committed by Scott Lahteine
parent 92ed9a2bb6
commit 35160dfb7a

View file

@ -245,13 +245,23 @@ void PrintJobRecovery::resume() {
gcode.process_subcommands_now_P(PSTR("M420 S0 Z0")); gcode.process_subcommands_now_P(PSTR("M420 S0 Z0"));
#endif #endif
// Reset E, raise Z, home XY...
gcode.process_subcommands_now_P(PSTR("G92.9 E0"
#if Z_HOME_DIR > 0
// If Z homing goes to max, reset E and home all
"\nG28R0"
#if ENABLED(MARLIN_DEV_MODE)
"S"
#endif
#else
// Set Z to 0, raise Z by RECOVERY_ZRAISE, and Home (XY only for Cartesian) // Set Z to 0, raise Z by RECOVERY_ZRAISE, and Home (XY only for Cartesian)
// with no raise. (Only do simulated homing in Marlin Dev Mode.) // with no raise. (Only do simulated homing in Marlin Dev Mode.)
gcode.process_subcommands_now_P(PSTR("G92.9 E0 Z0\nG1 Z" STRINGIFY(RECOVERY_ZRAISE) "\nG28 R0" "Z0\nG1Z" STRINGIFY(RECOVERY_ZRAISE) "\nG28R0"
#if ENABLED(MARLIN_DEV_MODE) #if ENABLED(MARLIN_DEV_MODE)
" S" "S"
#elif !IS_KINEMATIC #elif !IS_KINEMATIC
" X Y" "XY"
#endif
#endif #endif
)); ));