[1.1.x] Fix NO_MOTION_BEFORE_HOMING unwanted behaviour (#8177)

* [1.1.x] Fix NO_MOTION_BEFORE_HOMING unwanted behaviour

NO_MOTION_BEFORE_HOMING should prevent XYZ movements only when homing is not done.
E axes should be allowed

* Update Marlin_main.cpp

* Update Marlin_main.cpp

* Update Marlin_main.cpp
This commit is contained in:
GMagician 2017-10-31 04:50:50 +01:00 committed by Scott Lahteine
parent 4817c0d055
commit 15be1cb9a9

View File

@ -3415,6 +3415,12 @@ void gcode_get_destination() {
***************** GCode Handlers *****************
**************************************************/
#if ENABLED(NO_MOTION_BEFORE_HOMING)
#define G0_G1_CONDITION !axis_unhomed_error(parser.seen('X'), parser.seen('Y'), parser.seen('Z'))
#else
#define G0_G1_CONDITION true
#endif
/**
* G0, G1: Coordinated movement of X Y Z E axes
*/
@ -3423,11 +3429,7 @@ inline void gcode_G0_G1(
bool fast_move=false
#endif
) {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
if (IsRunning() && G0_G1_CONDITION) {
gcode_get_destination(); // For X Y Z E F
#if ENABLED(FWRETRACT)