Operate in Native Machine Space
This commit is contained in:
@@ -86,8 +86,8 @@
|
||||
/**
|
||||
* Move the Z probe (or just the nozzle) to the safe homing point
|
||||
*/
|
||||
destination[X_AXIS] = LOGICAL_X_POSITION(Z_SAFE_HOMING_X_POINT);
|
||||
destination[Y_AXIS] = LOGICAL_Y_POSITION(Z_SAFE_HOMING_Y_POINT);
|
||||
destination[X_AXIS] = Z_SAFE_HOMING_X_POINT;
|
||||
destination[Y_AXIS] = Z_SAFE_HOMING_Y_POINT;
|
||||
destination[Z_AXIS] = current_position[Z_AXIS]; // Z is already at the right height
|
||||
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
@@ -95,7 +95,7 @@
|
||||
destination[Y_AXIS] -= Y_PROBE_OFFSET_FROM_EXTRUDER;
|
||||
#endif
|
||||
|
||||
if (position_is_reachable_xy(destination[X_AXIS], destination[Y_AXIS])) {
|
||||
if (position_is_reachable(destination[X_AXIS], destination[Y_AXIS])) {
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("Z_SAFE_HOMING", destination);
|
||||
@@ -209,7 +209,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
|
||||
if (home_all || homeX || homeY) {
|
||||
// Raise Z before homing any other axes and z is not already high enough (never lower z)
|
||||
destination[Z_AXIS] = LOGICAL_Z_POSITION(Z_HOMING_HEIGHT);
|
||||
destination[Z_AXIS] = Z_HOMING_HEIGHT;
|
||||
if (destination[Z_AXIS] > current_position[Z_AXIS]) {
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
@@ -251,7 +251,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
HOMEAXIS(X);
|
||||
|
||||
// Remember this extruder's position for later tool change
|
||||
inactive_extruder_x_pos = RAW_X_POSITION(current_position[X_AXIS]);
|
||||
inactive_extruder_x_pos = current_position[X_AXIS];
|
||||
|
||||
// Home the 1st (left) extruder
|
||||
active_extruder = 0;
|
||||
|
@@ -459,7 +459,7 @@ void GcodeSuite::G33() {
|
||||
LOOP_CAL_RAD(axis) {
|
||||
const float a = RADIANS(210 + (360 / NPP) * (axis - 1)),
|
||||
r = delta_calibration_radius * (1 + (_7p_9_centre ? 0.1 : 0.0));
|
||||
if (!position_is_reachable_xy(cos(a) * r, sin(a) * r)) {
|
||||
if (!position_is_reachable(cos(a) * r, sin(a) * r)) {
|
||||
SERIAL_PROTOCOLLNPGM("?(M665 B)ed radius is implausible.");
|
||||
return;
|
||||
}
|
||||
|
@@ -82,16 +82,16 @@ void GcodeSuite::M48() {
|
||||
Y_probe_location = parser.linearval('Y', Y_current + Y_PROBE_OFFSET_FROM_EXTRUDER);
|
||||
|
||||
#if DISABLED(DELTA)
|
||||
if (!WITHIN(X_probe_location, LOGICAL_X_POSITION(MIN_PROBE_X), LOGICAL_X_POSITION(MAX_PROBE_X))) {
|
||||
if (!WITHIN(X_probe_location, MIN_PROBE_X, MAX_PROBE_X)) {
|
||||
out_of_range_error(PSTR("X"));
|
||||
return;
|
||||
}
|
||||
if (!WITHIN(Y_probe_location, LOGICAL_Y_POSITION(MIN_PROBE_Y), LOGICAL_Y_POSITION(MAX_PROBE_Y))) {
|
||||
if (!WITHIN(Y_probe_location, MIN_PROBE_Y, MAX_PROBE_Y)) {
|
||||
out_of_range_error(PSTR("Y"));
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (!position_is_reachable_by_probe_xy(X_probe_location, Y_probe_location)) {
|
||||
if (!position_is_reachable_by_probe(X_probe_location, Y_probe_location)) {
|
||||
SERIAL_PROTOCOLLNPGM("? (X,Y) location outside of probeable radius.");
|
||||
return;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void GcodeSuite::M48() {
|
||||
#else
|
||||
// If we have gone out too far, we can do a simple fix and scale the numbers
|
||||
// back in closer to the origin.
|
||||
while (!position_is_reachable_by_probe_xy(X_current, Y_current)) {
|
||||
while (!position_is_reachable_by_probe(X_current, Y_current)) {
|
||||
X_current *= 0.8;
|
||||
Y_current *= 0.8;
|
||||
if (verbose_level > 3) {
|
||||
|
Reference in New Issue
Block a user