ソースを参照

Don't deploy Z Probe on Z homing if Z_PROBE_AND_ENDSTOP is defined.

Chris Roadfeldt 9年前
コミット
08a7aa16c5
1個のファイルの変更9行の追加5行の削除
  1. 9
    5
      Marlin/Marlin_main.cpp

+ 9
- 5
Marlin/Marlin_main.cpp ファイルの表示

@@ -1493,18 +1493,20 @@ static void homeaxis(int axis) {
1493 1493
 
1494 1494
 
1495 1495
 #ifndef Z_PROBE_SLED
1496
-    // Engage Servo endstop if enabled
1497
-    #ifdef SERVO_ENDSTOPS
1498
-      #if SERVO_LEVELING
1496
+    // Engage Servo endstop if enabled and we are not using Z_PROBE_AND_ENDSTOP
1497
+    #ifndef Z_PROBE_AND_ENDSTOP
1498
+      #ifdef SERVO_ENDSTOPS
1499
+        #if SERVO_LEVELING
1499 1500
         if (axis==Z_AXIS) {
1500 1501
           engage_z_probe();
1501 1502
         }
1502 1503
       else
1503
-      #endif
1504
+        #endif
1504 1505
       if (servo_endstops[axis] > -1) {
1505 1506
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
1506 1507
       }
1507
-    #endif
1508
+      #endif
1509
+    #endif // Z_PROBE_AND_ENDSTOP
1508 1510
 #endif // Z_PROBE_SLED
1509 1511
     #ifdef Z_DUAL_ENDSTOPS
1510 1512
       if (axis==Z_AXIS) In_Homing_Process(true);
@@ -1922,10 +1924,12 @@ inline void gcode_G28() {
1922 1924
 
1923 1925
         if (home_all_axis || code_seen(axis_codes[Z_AXIS])) {
1924 1926
           #if defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
1927
+            #ifndef Z_PROBE_AND_ENDSTOP
1925 1928
             destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS);    // Set destination away from bed
1926 1929
             feedrate = max_feedrate[Z_AXIS];
1927 1930
             plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1928 1931
             st_synchronize();
1932
+            #endif
1929 1933
           #endif
1930 1934
           HOMEAXIS(Z);
1931 1935
         }

読み込み中…
キャンセル
保存