Browse Source

Make raise_z_after_probing null sometimes

Scott Lahteine 9 years ago
parent
commit
9eecb4404b
1 changed files with 9 additions and 14 deletions
  1. 9
    14
      Marlin/Marlin_main.cpp

+ 9
- 14
Marlin/Marlin_main.cpp View File

1696
   }
1696
   }
1697
 
1697
 
1698
   inline void raise_z_after_probing() {
1698
   inline void raise_z_after_probing() {
1699
-    do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
1699
+    #if Z_RAISE_AFTER_PROBING > 0
1700
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
1701
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("raise_z_after_probing()");
1702
+      #endif
1703
+      do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
1704
+    #endif
1700
   }
1705
   }
1701
 
1706
 
1702
   static void clean_up_after_endstop_move() {
1707
   static void clean_up_after_endstop_move() {
1822
 
1827
 
1823
         #if Z_RAISE_AFTER_PROBING > 0
1828
         #if Z_RAISE_AFTER_PROBING > 0
1824
           if (doRaise) {
1829
           if (doRaise) {
1825
-            #if ENABLED(DEBUG_LEVELING_FEATURE)
1826
-              if (DEBUGGING(LEVELING)) {
1827
-                SERIAL_ECHOPAIR("Raise Z (after) by ", Z_RAISE_AFTER_PROBING);
1828
-                SERIAL_EOL;
1829
-                SERIAL_ECHO("> SERVO_ENDSTOPS > raise_z_after_probing()");
1830
-                SERIAL_EOL;
1831
-              }
1832
-            #endif
1833
             raise_z_after_probing(); // this also updates current_position
1830
             raise_z_after_probing(); // this also updates current_position
1834
             stepper.synchronize();
1831
             stepper.synchronize();
1835
           }
1832
           }
2117
 
2114
 
2118
     float oldXpos = current_position[X_AXIS]; // save x position
2115
     float oldXpos = current_position[X_AXIS]; // save x position
2119
     if (dock) {
2116
     if (dock) {
2120
-      #if Z_RAISE_AFTER_PROBING > 0
2121
-        raise_z_after_probing(); // raise Z
2122
-      #endif
2117
+      raise_z_after_probing(); // raise Z
2123
       // Dock sled a bit closer to ensure proper capturing
2118
       // Dock sled a bit closer to ensure proper capturing
2124
       do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1);
2119
       do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1);
2125
       digitalWrite(SLED_PIN, LOW); // turn off magnet
2120
       digitalWrite(SLED_PIN, LOW); // turn off magnet
3578
       // Allen Key Probe for Delta
3573
       // Allen Key Probe for Delta
3579
       #if ENABLED(Z_PROBE_ALLEN_KEY) || SERVO_LEVELING
3574
       #if ENABLED(Z_PROBE_ALLEN_KEY) || SERVO_LEVELING
3580
         stow_z_probe();
3575
         stow_z_probe();
3581
-      #elif Z_RAISE_AFTER_PROBING > 0
3576
+      #else
3582
         raise_z_after_probing(); // for non Allen Key probes, such as simple mechanical probe
3577
         raise_z_after_probing(); // for non Allen Key probes, such as simple mechanical probe
3583
       #endif
3578
       #endif
3584
     #else // !DELTA
3579
     #else // !DELTA
3653
       // Sled assembly for Cartesian bots
3648
       // Sled assembly for Cartesian bots
3654
       #if ENABLED(Z_PROBE_SLED)
3649
       #if ENABLED(Z_PROBE_SLED)
3655
         dock_sled(true); // dock the sled
3650
         dock_sled(true); // dock the sled
3656
-      #elif Z_RAISE_AFTER_PROBING > 0
3651
+      #else
3657
         // Raise Z axis for non-delta and non servo based probes
3652
         // Raise Z axis for non-delta and non servo based probes
3658
         #if DISABLED(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_ALLEN_KEY) && DISABLED(Z_PROBE_SLED)
3653
         #if DISABLED(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_ALLEN_KEY) && DISABLED(Z_PROBE_SLED)
3659
           raise_z_after_probing();
3654
           raise_z_after_probing();

Loading…
Cancel
Save