Update motion.cpp

fix for machines with z_min endstops + probes
This commit is contained in:
12oclocker 2026-02-23 21:20:04 -05:00 committed by GitHub
parent b553c0e62a
commit e3e76d9589
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2898,6 +2898,11 @@ void Motion::set_axis_is_at_home(const AxisEnum axis) {
#endif
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z homed with PROBE" TERN_(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, " (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)") " ***\n> (M851 Z", probe.offset.z, ")");
#else
/**
* This is critical for machines with z_min endstops + probes (probe and Z endstop are independent),
* force Z to be 0 so that auto MESH bed leveling correctly applies probe offset from a properly endstop zeroed bed.
*/
position.z = 0; //critical for machines with z_min endstops + probes
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z homed to ENDSTOP ***");
#endif
}