瀏覽代碼

[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
 
33
 
34
 extern float destination[XYZE];
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
  * G0, G1: Coordinated movement of X Y Z E axes
43
  * G0, G1: Coordinated movement of X Y Z E axes
38
  */
44
  */
41
     bool fast_move/*=false*/
47
     bool fast_move/*=false*/
42
   #endif
48
   #endif
43
 ) {
49
 ) {
44
-  if (MOTION_CONDITIONS) {
50
+  if (IsRunning() && G0_G1_CONDITION) {
45
     get_destination_from_command(); // For X Y Z E F
51
     get_destination_from_command(); // For X Y Z E F
46
 
52
 
47
     #if ENABLED(FWRETRACT)
53
     #if ENABLED(FWRETRACT)

Loading…
取消
儲存