Fix MIN_PROBE_EDGE bug in default ABL G29 (#16367)

This commit is contained in:
Jason Smith
2020-01-03 17:46:26 -06:00
committed by Scott Lahteine
parent d7aee3b7b6
commit 3cade6245e
17 changed files with 175 additions and 110 deletions

View File

@ -133,7 +133,7 @@
destination.set(safe_homing_xy, current_position.z);
#if HOMING_Z_WITH_PROBE
destination -= probe_offset;
destination -= probe_offset_xy;
#endif
if (position_is_reachable(destination)) {

View File

@ -77,8 +77,8 @@ void GcodeSuite::M48() {
xy_float_t next_pos = current_position;
const xy_pos_t probe_pos = {
parser.linearval('X', next_pos.x + probe_offset.x),
parser.linearval('Y', next_pos.y + probe_offset.y)
parser.linearval('X', next_pos.x + probe_offset_xy.x),
parser.linearval('Y', next_pos.y + probe_offset_xy.y)
};
if (!position_is_reachable_by_probe(probe_pos)) {
@ -166,8 +166,9 @@ void GcodeSuite::M48() {
while (angle < 0.0) angle += 360.0; // outside of this range. It looks like they behave correctly with
// numbers outside of the range, but just to be safe we clamp them.
next_pos.set(probe_pos.x - probe_offset.x + cos(RADIANS(angle)) * radius,
probe_pos.y - probe_offset.y + sin(RADIANS(angle)) * radius);
const xy_pos_t noz_pos = probe_pos - probe_offset_xy;
next_pos.set(noz_pos.x + cos(RADIANS(angle)) * radius,
noz_pos.y + sin(RADIANS(angle)) * radius);
#if DISABLED(DELTA)
LIMIT(next_pos.x, X_MIN_POS, X_MAX_POS);