Browse Source

Arrange ProbeAction values bitwise

Scott Lahteine 10 years ago
parent
commit
7f8ea7105f
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/Marlin_main.cpp

+ 3
- 3
Marlin/Marlin_main.cpp View File

1200
     #endif
1200
     #endif
1201
 }
1201
 }
1202
 
1202
 
1203
-enum ProbeAction { ProbeEngageRetract, ProbeEngage, ProbeStay, ProbeRetract };
1203
+enum ProbeAction { ProbeStay, ProbeEngage, ProbeRetract, ProbeEngageRetract };
1204
 
1204
 
1205
 /// Probe bed height at position (x,y), returns the measured z value
1205
 /// Probe bed height at position (x,y), returns the measured z value
1206
 static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract) {
1206
 static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract) {
1209
   do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1209
   do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
1210
 
1210
 
1211
   #ifndef Z_PROBE_SLED
1211
   #ifndef Z_PROBE_SLED
1212
-    if (retract_action == ProbeEngageRetract || retract_action == ProbeEngage) engage_z_probe();
1212
+    if (retract_action & ProbeEngage) engage_z_probe();
1213
   #endif
1213
   #endif
1214
 
1214
 
1215
   run_z_probe();
1215
   run_z_probe();
1216
   float measured_z = current_position[Z_AXIS];
1216
   float measured_z = current_position[Z_AXIS];
1217
 
1217
 
1218
   #ifndef Z_PROBE_SLED
1218
   #ifndef Z_PROBE_SLED
1219
-    if (retract_action == ProbeEngageRetract || retract_action == ProbeRetract) retract_z_probe();
1219
+    if (retract_action & ProbeRetract) retract_z_probe();
1220
   #endif
1220
   #endif
1221
 
1221
 
1222
   SERIAL_PROTOCOLPGM(MSG_BED);
1222
   SERIAL_PROTOCOLPGM(MSG_BED);

Loading…
Cancel
Save