瀏覽代碼

[2.0.x] Fix NO_MOTION_BEFORE_HOMING unwanted behaviour (#8176)

* [2.0.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 G0_G1.cpp

* Update G0_G1.cpp
GMagician 7 年之前
父節點
當前提交
727a403ba1
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7
    1
      Marlin/src/gcode/motion/G0_G1.cpp

+ 7
- 1
Marlin/src/gcode/motion/G0_G1.cpp 查看文件

@@ -33,6 +33,12 @@
33 33
 
34 34
 extern float destination[XYZE];
35 35
 
36
+#if ENABLED(NO_MOTION_BEFORE_HOMING)
37
+  #define G0_G1_CONDITION !axis_unhomed_error(parser.seen('X'), parser.seen('Y'), parser.seen('Z'))
38
+#else
39
+  #define G0_G1_CONDITION true
40
+#endif
41
+
36 42
 /**
37 43
  * G0, G1: Coordinated movement of X Y Z E axes
38 44
  */
@@ -41,7 +47,7 @@ void GcodeSuite::G0_G1(
41 47
     bool fast_move/*=false*/
42 48
   #endif
43 49
 ) {
44
-  if (MOTION_CONDITIONS) {
50
+  if (IsRunning() && G0_G1_CONDITION) {
45 51
     get_destination_from_command(); // For X Y Z E F
46 52
 
47 53
     #if ENABLED(FWRETRACT)

Loading…
取消
儲存