Allow no raise after run_z_probe in probe_pt

This commit is contained in:
Scott Lahteine
2018-03-21 01:01:43 -05:00
parent ae39fbd646
commit c352954882
7 changed files with 28 additions and 21 deletions

View File

@ -137,7 +137,7 @@ static void G33_cleanup(
inline float calibration_probe(const float nx, const float ny, const bool stow) {
#if HAS_BED_PROBE
return probe_pt(nx, ny, stow, 0, false);
return probe_pt(nx, ny, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, false);
#else
UNUSED(stow);
return lcd_probe_pt(nx, ny);

View File

@ -70,7 +70,7 @@ void GcodeSuite::M48() {
return;
}
const bool stow_probe_after_each = parser.boolval('E');
const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE;
float X_current = current_position[X_AXIS],
Y_current = current_position[Y_AXIS];
@ -114,7 +114,7 @@ void GcodeSuite::M48() {
double mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples];
// Move to the first point, deploy, and probe
const float t = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level);
const float t = probe_pt(X_probe_location, Y_probe_location, raise_after, verbose_level);
bool probing_good = !isnan(t);
if (probing_good) {
@ -190,7 +190,7 @@ void GcodeSuite::M48() {
} // n_legs
// Probe a single point
sample_set[n] = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, 0);
sample_set[n] = probe_pt(X_probe_location, Y_probe_location, raise_after, 0);
// Break the loop if the probe fails
probing_good = !isnan(sample_set[n]);