Browse Source

Simpler handling of sled/allen-key in probe_pt

Scott Lahteine 9 years ago
parent
commit
0e18a4897b
1 changed files with 16 additions and 15 deletions
  1. 16
    15
      Marlin/Marlin_main.cpp

+ 16
- 15
Marlin/Marlin_main.cpp View File

2163
     // this also updates current_position
2163
     // this also updates current_position
2164
     do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2164
     do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2165
 
2165
 
2166
-    #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
2167
-      if (probe_action & ProbeDeploy) {
2168
-        #if ENABLED(DEBUG_LEVELING_FEATURE)
2169
-          if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeDeploy");
2170
-        #endif
2171
-        deploy_z_probe();
2172
-      }
2166
+    // Z Sled and Allen Key should never deploy-and-stow
2167
+    #if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY)
2168
+      if (probe_action == ProbeDeployAndStow) probe_action == ProbeStay;
2173
     #endif
2169
     #endif
2174
 
2170
 
2171
+    if (probe_action & ProbeDeploy) {
2172
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
2173
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeDeploy");
2174
+      #endif
2175
+      deploy_z_probe();
2176
+    }
2177
+
2175
     run_z_probe();
2178
     run_z_probe();
2176
     float measured_z = current_position[Z_AXIS];
2179
     float measured_z = current_position[Z_AXIS];
2177
 
2180
 
2178
-    #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
2179
-      if (probe_action & ProbeStow) {
2180
-        #if ENABLED(DEBUG_LEVELING_FEATURE)
2181
-          if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeStow (stow_z_probe will do Z Raise)");
2182
-        #endif
2183
-        stow_z_probe();
2184
-      }
2185
-    #endif
2181
+    if (probe_action & ProbeStow) {
2182
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
2183
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeStow (stow_z_probe will do Z Raise)");
2184
+      #endif
2185
+      stow_z_probe();
2186
+    }
2186
 
2187
 
2187
     if (verbose_level > 2) {
2188
     if (verbose_level > 2) {
2188
       SERIAL_PROTOCOLPGM("Bed X: ");
2189
       SERIAL_PROTOCOLPGM("Bed X: ");

Loading…
Cancel
Save