Browse Source

Merge pull request #1755 from thinkyhead/fixup_config

Raise when not retracting
Scott Lahteine 10 years ago
parent
commit
5f6962dd90
1 changed files with 13 additions and 6 deletions
  1. 13
    6
      Marlin/Marlin_main.cpp

+ 13
- 6
Marlin/Marlin_main.cpp View File

1254
 
1254
 
1255
   }
1255
   }
1256
 
1256
 
1257
-  static void retract_z_probe(const float z_after=Z_RAISE_AFTER_PROBING) {
1257
+  static void retract_z_probe() {
1258
 
1258
 
1259
     #ifdef SERVO_ENDSTOPS
1259
     #ifdef SERVO_ENDSTOPS
1260
 
1260
 
1261
       // Retract Z Servo endstop if enabled
1261
       // Retract Z Servo endstop if enabled
1262
       if (servo_endstops[Z_AXIS] >= 0) {
1262
       if (servo_endstops[Z_AXIS] >= 0) {
1263
 
1263
 
1264
-        if (z_after > 0) {
1265
-          do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_after);
1264
+        #if Z_RAISE_AFTER_PROBING > 0
1265
+          do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
1266
           st_synchronize();
1266
           st_synchronize();
1267
-        }
1268
-      
1267
+        #endif
1268
+
1269
         #if SERVO_LEVELING
1269
         #if SERVO_LEVELING
1270
           servos[servo_endstops[Z_AXIS]].attach(0);
1270
           servos[servo_endstops[Z_AXIS]].attach(0);
1271
         #endif
1271
         #endif
1343
     run_z_probe();
1343
     run_z_probe();
1344
     float measured_z = current_position[Z_AXIS];
1344
     float measured_z = current_position[Z_AXIS];
1345
 
1345
 
1346
+    #if Z_RAISE_BETWEEN_PROBINGS > 0
1347
+      if (retract_action == ProbeStay) {
1348
+        do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BETWEEN_PROBINGS);
1349
+        st_synchronize();
1350
+      }
1351
+    #endif
1352
+
1346
     #if !defined(Z_PROBE_SLED) && !defined(Z_PROBE_ALLEN_KEY)
1353
     #if !defined(Z_PROBE_SLED) && !defined(Z_PROBE_ALLEN_KEY)
1347
-      if (retract_action & ProbeRetract) retract_z_probe(z_before);
1354
+      if (retract_action & ProbeRetract) retract_z_probe();
1348
     #endif
1355
     #endif
1349
 
1356
 
1350
     if (verbose_level > 2) {
1357
     if (verbose_level > 2) {

Loading…
Cancel
Save