Allow no raise after run_z_probe in probe_pt

This commit is contained in:
Scott Lahteine 2018-03-20 17:55:17 -05:00
parent 4eddcf9142
commit e5fbbbc068
3 changed files with 28 additions and 21 deletions

View file

@ -51,7 +51,6 @@
extern float meshedit_done;
extern long babysteps_done;
float probe_pt(const float &rx, const float &ry, const bool, const uint8_t, const bool=true);
#define SIZE_OF_LITTLE_RAISE 1
#define BIG_RAISE_NOT_NEEDED 0
@ -746,7 +745,7 @@
const float rawx = mesh_index_to_xpos(location.x_index),
rawy = mesh_index_to_ypos(location.y_index);
const float measured_z = probe_pt(rawx, rawy, stow_probe, g29_verbose_level); // TODO: Needs error handling
const float measured_z = probe_pt(rawx, rawy, stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling
z_values[location.x_index][location.y_index] = measured_z;
}
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
@ -1515,7 +1514,7 @@
incremental_LSF_reset(&lsf_results);
if (do_3_pt_leveling) {
measured_z = probe_pt(PROBE_PT_1_X, PROBE_PT_1_Y, false, g29_verbose_level);
measured_z = probe_pt(PROBE_PT_1_X, PROBE_PT_1_Y, PROBE_PT_RAISE, g29_verbose_level);
if (isnan(measured_z))
abort_flag = true;
else {
@ -1529,7 +1528,7 @@
}
if (!abort_flag) {
measured_z = probe_pt(PROBE_PT_2_X, PROBE_PT_2_Y, false, g29_verbose_level);
measured_z = probe_pt(PROBE_PT_2_X, PROBE_PT_2_Y, PROBE_PT_RAISE, g29_verbose_level);
//z2 = measured_z;
if (isnan(measured_z))
abort_flag = true;
@ -1544,7 +1543,7 @@
}
if (!abort_flag) {
measured_z = probe_pt(PROBE_PT_3_X, PROBE_PT_3_Y, true, g29_verbose_level);
measured_z = probe_pt(PROBE_PT_3_X, PROBE_PT_3_Y, PROBE_PT_STOW, g29_verbose_level);
//z3 = measured_z;
if (isnan(measured_z))
abort_flag = true;
@ -1572,7 +1571,7 @@
const float ry = float(y_min) + dy * (zig_zag ? g29_grid_size - 1 - iy : iy);
if (!abort_flag) {
measured_z = probe_pt(rx, ry, parser.seen('E'), g29_verbose_level); // TODO: Needs error handling
measured_z = probe_pt(rx, ry, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling
abort_flag = isnan(measured_z);