Skip to content

Commit a2954c4

Browse files
committed
Allow disabling M428 home offset limits
The limits were introduced in MarlinFirmware#2001 but are too limiting for our printer. Add option to disable checking the limit because it it not clear why it needs to be 20 close to the stops.
1 parent 8768fbf commit a2954c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Marlin/src/gcode/geometry/M206_M428.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ void GcodeSuite::M428() {
8585
xyz_float_t diff;
8686
LOOP_NUM_AXES(i) {
8787
diff[i] = base_home_pos((AxisEnum)i) - current_position[i];
88+
#ifndef DISABLE_M428_LIMITS
8889
if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0)
8990
diff[i] = -current_position[i];
9091
if (!WITHIN(diff[i], -20, 20)) {
@@ -93,6 +94,7 @@ void GcodeSuite::M428() {
9394
ERR_BUZZ();
9495
return;
9596
}
97+
#endif
9698
}
9799

98100
LOOP_NUM_AXES(i) set_home_offset((AxisEnum)i, diff[i]);

0 commit comments

Comments
 (0)