Allow UBL G29 J1 with PAUSE_BEFORE_DEPLOY_STOW (#15934)

2.0.x
Jason Smith 5 years ago committed by Scott Lahteine
parent 7116a8645c
commit 9906e96ffb

@ -741,13 +741,13 @@
* This attempts to fill in locations closest to the nozzle's start location first. * This attempts to fill in locations closest to the nozzle's start location first.
*/ */
void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) { void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
DEPLOY_PROBE(); // Deploy before ui.capture() to allow for PAUSE_BEFORE_DEPLOY_STOW
#if HAS_LCD_MENU #if HAS_LCD_MENU
ui.capture(); ui.capture();
#endif #endif
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
DEPLOY_PROBE();
uint8_t count = GRID_MAX_POINTS; uint8_t count = GRID_MAX_POINTS;
mesh_index_pair best; mesh_index_pair best;
@ -764,10 +764,10 @@
if (ui.button_pressed()) { if (ui.button_pressed()) {
ui.quick_feedback(false); // Preserve button state for click-and-hold ui.quick_feedback(false); // Preserve button state for click-and-hold
SERIAL_ECHOLNPGM("\nMesh only partially populated.\n"); SERIAL_ECHOLNPGM("\nMesh only partially populated.\n");
STOW_PROBE();
ui.wait_for_release(); ui.wait_for_release();
ui.quick_feedback(); ui.quick_feedback();
ui.release(); ui.release();
STOW_PROBE(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW
return restore_ubl_active_state_and_leave(); return restore_ubl_active_state_and_leave();
} }
#endif #endif
@ -790,7 +790,9 @@
} while (best.pos.x >= 0 && --count); } while (best.pos.x >= 0 && --count);
STOW_PROBE(); ui.release();
STOW_PROBE(); // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW
ui.capture();
#ifdef Z_AFTER_PROBING #ifdef Z_AFTER_PROBING
move_z_after_probing(); move_z_after_probing();
@ -1504,18 +1506,20 @@
abort_flag = isnan(measured_z); abort_flag = isnan(measured_z);
if (DEBUGGING(LEVELING)) { #if ENABLED(DEBUG_LEVELING_FEATURE)
const xy_pos_t lpos = rpos.asLogical(); if (DEBUGGING(LEVELING)) {
DEBUG_CHAR('('); const xy_pos_t lpos = rpos.asLogical();
DEBUG_ECHO_F(rpos.x, 7); DEBUG_CHAR('(');
DEBUG_CHAR(','); DEBUG_ECHO_F(rpos.x, 7);
DEBUG_ECHO_F(rpos.y, 7); DEBUG_CHAR(',');
DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7); DEBUG_ECHO_F(rpos.y, 7);
DEBUG_CHAR(','); DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7);
DEBUG_ECHO_F(lpos.y, 7); DEBUG_CHAR(',');
DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); DEBUG_ECHO_F(lpos.y, 7);
DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7); DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7);
} DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7);
}
#endif
measured_z -= get_z_correction(rpos) /* + probe_offset.z */ ; measured_z -= get_z_correction(rpos) /* + probe_offset.z */ ;

Loading…
Cancel
Save