1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

Arrange ProbeAction values bitwise

This commit is contained in:
Scott Lahteine 2015-03-02 20:14:37 -08:00
parent 7684721977
commit 7f8ea7105f

View File

@ -1200,7 +1200,7 @@ static void retract_z_probe() {
#endif #endif
} }
enum ProbeAction { ProbeEngageRetract, ProbeEngage, ProbeStay, ProbeRetract }; enum ProbeAction { ProbeStay, ProbeEngage, ProbeRetract, ProbeEngageRetract };
/// Probe bed height at position (x,y), returns the measured z value /// Probe bed height at position (x,y), returns the measured z value
static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract) { static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract) {
@ -1209,14 +1209,14 @@ static float probe_pt(float x, float y, float z_before, ProbeAction retract_acti
do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]); do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
#ifndef Z_PROBE_SLED #ifndef Z_PROBE_SLED
if (retract_action == ProbeEngageRetract || retract_action == ProbeEngage) engage_z_probe(); if (retract_action & ProbeEngage) engage_z_probe();
#endif #endif
run_z_probe(); run_z_probe();
float measured_z = current_position[Z_AXIS]; float measured_z = current_position[Z_AXIS];
#ifndef Z_PROBE_SLED #ifndef Z_PROBE_SLED
if (retract_action == ProbeEngageRetract || retract_action == ProbeRetract) retract_z_probe(); if (retract_action & ProbeRetract) retract_z_probe();
#endif #endif
SERIAL_PROTOCOLPGM(MSG_BED); SERIAL_PROTOCOLPGM(MSG_BED);