Fix LEVEL_CORNERS_USE_PROBE
This commit is contained in:
@@ -221,13 +221,13 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||
|
||||
bool _lcd_level_bed_corners_probe(bool verify=false) {
|
||||
if (verify) do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP); // do clearance if needed
|
||||
if (!bltouch.high_speed_mode) bltouch.deploy(); // Deploy in LOW SPEED MODE on every probe action
|
||||
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action
|
||||
do_blocking_move_to_z(last_z - LEVEL_CORNERS_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance
|
||||
if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered
|
||||
endstops.hit_on_purpose();
|
||||
set_current_from_steppers_for_axis(Z_AXIS);
|
||||
sync_plan_position();
|
||||
if (!bltouch.high_speed_mode) bltouch.stow(); // Stow in LOW SPEED MODE on every trigger
|
||||
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow()); // Stow in LOW SPEED MODE on every trigger
|
||||
// Triggered outside tolerance range?
|
||||
if (ABS(current_position.z - last_z) > LEVEL_CORNERS_PROBE_TOLERANCE) {
|
||||
last_z = current_position.z; // Above tolerance. Set a new Z for subsequent corners.
|
||||
@@ -253,7 +253,7 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||
}
|
||||
idle();
|
||||
}
|
||||
if (!bltouch.high_speed_mode) bltouch.stow();
|
||||
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow());
|
||||
ui.goto_screen(_lcd_draw_probing);
|
||||
return (probe_triggered);
|
||||
}
|
||||
@@ -267,13 +267,14 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||
do {
|
||||
ui.refresh(LCDVIEW_REDRAW_NOW);
|
||||
_lcd_draw_probing(); // update screen with # of good points
|
||||
do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP + (bltouch.high_speed_mode ? 7, 0)); // clearance
|
||||
|
||||
do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance
|
||||
|
||||
_lcd_level_bed_corners_get_next_position(); // Select next corner coordinates
|
||||
current_position -= probe.offset_xy; // Account for probe offsets
|
||||
do_blocking_move_to_xy(current_position); // Goto corner
|
||||
|
||||
if (bltouch.high_speed_mode) bltouch.deploy(); // Deploy in HIGH SPEED MODE
|
||||
TERN_(BLTOUCH, if (bltouch.high_speed_mode) bltouch.deploy()); // Deploy in HIGH SPEED MODE
|
||||
if (!_lcd_level_bed_corners_probe()) { // Probe down to tolerance
|
||||
if (_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed
|
||||
#if ENABLED(LEVEL_CORNERS_VERIFY_RAISED) // Verify
|
||||
@@ -294,11 +295,13 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||
|
||||
} while (good_points < nr_edge_points); // loop until all points within tolerance
|
||||
|
||||
if (bltouch.high_speed_mode)
|
||||
// In HIGH SPEED MODE do clearance and stow at the very end
|
||||
do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP);
|
||||
bltouch.stow();
|
||||
}
|
||||
#if ENABLED(BLTOUCH)
|
||||
if (bltouch.high_speed_mode)
|
||||
// In HIGH SPEED MODE do clearance and stow at the very end
|
||||
do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP);
|
||||
bltouch.stow();
|
||||
}
|
||||
#endif
|
||||
|
||||
ui.goto_screen(_lcd_draw_level_prompt); // prompt for bed leveling
|
||||
ui.set_selection(true);
|
||||
|
||||
@@ -55,7 +55,7 @@ static int8_t reference_index; // = 0
|
||||
static bool probe_single_point() {
|
||||
do_blocking_move_to_z(TERN(BLTOUCH, Z_CLEARANCE_DEPLOY_PROBE, Z_CLEARANCE_BETWEEN_PROBES));
|
||||
// Stow after each point with BLTouch "HIGH SPEED" mode for push-pin safety
|
||||
const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], TERN(BLTOUCH, bltouch.high_speed_mode ? PROBE_PT_STOW : PROBE_PT_RAISE, PROBE_PT_RAISE), 0, true);
|
||||
const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], TERN0(BLTOUCH, bltouch.high_speed_mode) ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true);
|
||||
z_measured[tram_index] = z_probed_height;
|
||||
if (reference_index < 0) reference_index = tram_index;
|
||||
move_to_tramming_wait_pos();
|
||||
|
||||
@@ -2744,7 +2744,7 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
// BLTouch
|
||||
//
|
||||
TERN_(BLTOUCH_HS_MODE, bltouch.high_speed_mode = true);
|
||||
TERN_(BLTOUCH, bltouch.high_speed_mode = ENABLED(BLTOUCH_HS_MODE));
|
||||
|
||||
//
|
||||
// Kinematic settings
|
||||
|
||||
Reference in New Issue
Block a user