Allow consecutive uses of G29
This commit is contained in:
parent
19e768d43d
commit
55848a4bd8
@ -4740,8 +4740,9 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
|
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
|
|
||||||
// Disable auto bed leveling during G29
|
// Disable auto bed leveling during G29.
|
||||||
planner.leveling_active = false;
|
// Be formal so G29 can be done successively without G28.
|
||||||
|
set_bed_leveling_enabled(false);
|
||||||
|
|
||||||
if (!dryrun) {
|
if (!dryrun) {
|
||||||
// Re-orient the current position without leveling
|
// Re-orient the current position without leveling
|
||||||
@ -4755,7 +4756,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
// Deploy the probe. Probe will raise if needed.
|
// Deploy the probe. Probe will raise if needed.
|
||||||
if (DEPLOY_PROBE()) {
|
if (DEPLOY_PROBE()) {
|
||||||
planner.leveling_active = abl_should_enable;
|
set_bed_leveling_enabled(abl_should_enable);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -4772,10 +4773,6 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
|| left_probe_bed_position != bilinear_start[X_AXIS]
|
|| left_probe_bed_position != bilinear_start[X_AXIS]
|
||||||
|| front_probe_bed_position != bilinear_start[Y_AXIS]
|
|| front_probe_bed_position != bilinear_start[Y_AXIS]
|
||||||
) {
|
) {
|
||||||
if (dryrun) {
|
|
||||||
// Before reset bed level, re-enable to correct the position
|
|
||||||
planner.leveling_active = abl_should_enable;
|
|
||||||
}
|
|
||||||
// Reset grid to 0.0 or "not probed". (Also disables ABL)
|
// Reset grid to 0.0 or "not probed". (Also disables ABL)
|
||||||
reset_bed_level();
|
reset_bed_level();
|
||||||
|
|
||||||
@ -4819,7 +4816,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
#if HAS_SOFTWARE_ENDSTOPS
|
#if HAS_SOFTWARE_ENDSTOPS
|
||||||
soft_endstops_enabled = enable_soft_endstops;
|
soft_endstops_enabled = enable_soft_endstops;
|
||||||
#endif
|
#endif
|
||||||
planner.leveling_active = abl_should_enable;
|
set_bed_leveling_enabled(abl_should_enable);
|
||||||
g29_in_progress = false;
|
g29_in_progress = false;
|
||||||
#if ENABLED(LCD_BED_LEVELING)
|
#if ENABLED(LCD_BED_LEVELING)
|
||||||
lcd_wait_for_move = false;
|
lcd_wait_for_move = false;
|
||||||
@ -5022,7 +5019,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
||||||
|
|
||||||
if (isnan(measured_z)) {
|
if (isnan(measured_z)) {
|
||||||
planner.leveling_active = abl_should_enable;
|
set_bed_leveling_enabled(abl_should_enable);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5058,7 +5055,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
yProbe = points[i].y;
|
yProbe = points[i].y;
|
||||||
measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
||||||
if (isnan(measured_z)) {
|
if (isnan(measured_z)) {
|
||||||
planner.leveling_active = abl_should_enable;
|
set_bed_leveling_enabled(abl_should_enable);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
points[i].z = measured_z;
|
points[i].z = measured_z;
|
||||||
@ -5081,7 +5078,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
|
|
||||||
// Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe.
|
// Raise to _Z_CLEARANCE_DEPLOY_PROBE. Stow the probe.
|
||||||
if (STOW_PROBE()) {
|
if (STOW_PROBE()) {
|
||||||
planner.leveling_active = abl_should_enable;
|
set_bed_leveling_enabled(abl_should_enable);
|
||||||
measured_z = NAN;
|
measured_z = NAN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user