Encapsulate probe as singleton class (#16751)

This commit is contained in:
Scott Lahteine
2020-02-01 04:21:36 -06:00
committed by GitHub
parent 43d3463d5d
commit 90b6324563
33 changed files with 341 additions and 303 deletions

View File

@@ -100,7 +100,7 @@ void ac_cleanup(
do_blocking_move_to_z(delta_clip_start_height);
#endif
#if HAS_BED_PROBE
STOW_PROBE();
probe.stow();
#endif
restore_feedrate_and_scaling();
#if HOTENDS > 1
@@ -190,7 +190,7 @@ static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool
*/
static float calibration_probe(const xy_pos_t &xy, const bool stow) {
#if HAS_BED_PROBE
return probe_at_point(xy, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true);
return probe.probe_at_point(xy, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true);
#else
UNUSED(stow);
return lcd_probe_pt(xy);