Browse Source

[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
GMagician 7 years ago
parent
commit
15be1cb9a9
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      Marlin/Marlin_main.cpp

+ 7
- 5
Marlin/Marlin_main.cpp View File

3415
  ***************** GCode Handlers *****************
3415
  ***************** GCode Handlers *****************
3416
  **************************************************/
3416
  **************************************************/
3417
 
3417
 
3418
+#if ENABLED(NO_MOTION_BEFORE_HOMING)
3419
+  #define G0_G1_CONDITION !axis_unhomed_error(parser.seen('X'), parser.seen('Y'), parser.seen('Z'))
3420
+#else
3421
+  #define G0_G1_CONDITION true
3422
+#endif
3423
+
3418
 /**
3424
 /**
3419
  * G0, G1: Coordinated movement of X Y Z E axes
3425
  * G0, G1: Coordinated movement of X Y Z E axes
3420
  */
3426
  */
3423
     bool fast_move=false
3429
     bool fast_move=false
3424
   #endif
3430
   #endif
3425
 ) {
3431
 ) {
3426
-  #if ENABLED(NO_MOTION_BEFORE_HOMING)
3427
-    if (axis_unhomed_error()) return;
3428
-  #endif
3429
-
3430
-  if (IsRunning()) {
3432
+  if (IsRunning() && G0_G1_CONDITION) {
3431
     gcode_get_destination(); // For X Y Z E F
3433
     gcode_get_destination(); // For X Y Z E F
3432
 
3434
 
3433
     #if ENABLED(FWRETRACT)
3435
     #if ENABLED(FWRETRACT)

Loading…
Cancel
Save