Browse Source

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

Chris Roadfeldt 10 years ago
parent
commit
08a7aa16c5
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      Marlin/Marlin_main.cpp

+ 9
- 5
Marlin/Marlin_main.cpp View File

1493
 
1493
 
1494
 
1494
 
1495
 #ifndef Z_PROBE_SLED
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
         if (axis==Z_AXIS) {
1500
         if (axis==Z_AXIS) {
1500
           engage_z_probe();
1501
           engage_z_probe();
1501
         }
1502
         }
1502
       else
1503
       else
1503
-      #endif
1504
+        #endif
1504
       if (servo_endstops[axis] > -1) {
1505
       if (servo_endstops[axis] > -1) {
1505
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
1506
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
1506
       }
1507
       }
1507
-    #endif
1508
+      #endif
1509
+    #endif // Z_PROBE_AND_ENDSTOP
1508
 #endif // Z_PROBE_SLED
1510
 #endif // Z_PROBE_SLED
1509
     #ifdef Z_DUAL_ENDSTOPS
1511
     #ifdef Z_DUAL_ENDSTOPS
1510
       if (axis==Z_AXIS) In_Homing_Process(true);
1512
       if (axis==Z_AXIS) In_Homing_Process(true);
1922
 
1924
 
1923
         if (home_all_axis || code_seen(axis_codes[Z_AXIS])) {
1925
         if (home_all_axis || code_seen(axis_codes[Z_AXIS])) {
1924
           #if defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
1926
           #if defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
1927
+            #ifndef Z_PROBE_AND_ENDSTOP
1925
             destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS);    // Set destination away from bed
1928
             destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS);    // Set destination away from bed
1926
             feedrate = max_feedrate[Z_AXIS];
1929
             feedrate = max_feedrate[Z_AXIS];
1927
             plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1930
             plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
1928
             st_synchronize();
1931
             st_synchronize();
1932
+            #endif
1929
           #endif
1933
           #endif
1930
           HOMEAXIS(Z);
1934
           HOMEAXIS(Z);
1931
         }
1935
         }

Loading…
Cancel
Save