Browse Source

Allow UBL G29 J1 with PAUSE_BEFORE_DEPLOY_STOW (#15934)

pull/1/head
Jason Smith 5 years ago
committed by Scott Lahteine
parent
commit
9906e96ffb
  1. 12
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

12
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

@ -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,6 +1506,7 @@
abort_flag = isnan(measured_z); abort_flag = isnan(measured_z);
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
const xy_pos_t lpos = rpos.asLogical(); const xy_pos_t lpos = rpos.asLogical();
DEBUG_CHAR('('); DEBUG_CHAR('(');
@ -1516,6 +1519,7 @@
DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7);
DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 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