This commit is contained in:
nickweedon 2024-11-24 21:11:35 -08:00 committed by GitHub
commit 4928032886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -530,6 +530,18 @@ void GcodeSuite::G28() {
#endif // DUAL_X_CARRIAGE
#if HAS_BED_PROBE
// Perform precise homing using the same probing procedure as bed leveling
if (parser.seen_test('P')) {
xy_pos_t xyPos = { current_position.x, current_position.y };
float probedZHeight = probe.probe_at_point(xyPos, PROBE_PT_RAISE, 0, false);
DEBUG_ECHOLNPGM("Probed ZHeight (correction amount): ", probedZHeight);
current_position.z -= probedZHeight;
sync_plan_position();
}
#endif
endstops.not_homing();
// Clear endstop state for polled stallGuard endstops