Add custom types for position (#15204)
This commit is contained in:
@@ -48,7 +48,7 @@ inline bool G38_run_probe() {
|
||||
|
||||
#if MULTIPLE_PROBING > 1
|
||||
// Get direction of move and retract
|
||||
float retract_mm[XYZ];
|
||||
xyz_float_t retract_mm;
|
||||
LOOP_XYZ(i) {
|
||||
const float dist = destination[i] - current_position[i];
|
||||
retract_mm[i] = ABS(dist) < G38_MINIMUM_MOVE ? 0 : home_bump_mm((AxisEnum)i) * (dist > 0 ? -1 : 1);
|
||||
@@ -75,8 +75,7 @@ inline bool G38_run_probe() {
|
||||
|
||||
#if MULTIPLE_PROBING > 1
|
||||
// Move away by the retract distance
|
||||
set_destination_from_current();
|
||||
LOOP_XYZ(i) destination[i] += retract_mm[i];
|
||||
destination = current_position + retract_mm;
|
||||
endstops.enable(false);
|
||||
prepare_move_to_destination();
|
||||
planner.synchronize();
|
||||
@@ -84,7 +83,7 @@ inline bool G38_run_probe() {
|
||||
REMEMBER(fr, feedrate_mm_s, feedrate_mm_s * 0.25);
|
||||
|
||||
// Bump the target more slowly
|
||||
LOOP_XYZ(i) destination[i] -= retract_mm[i] * 2;
|
||||
destination -= retract_mm * 2;
|
||||
|
||||
G38_single_probe(move_value);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user