zprobe_offset => probe_offset

This commit is contained in:
Scott Lahteine
2019-09-24 23:35:49 -05:00
parent 3819f79945
commit 4e8d9fe59b
20 changed files with 79 additions and 79 deletions

View File

@ -56,7 +56,7 @@
#include "../feature/backlash.h"
#endif
float zprobe_offset[XYZ]; // Initialized by settings.load()
float probe_offset[XYZ]; // Initialized by settings.load()
#if ENABLED(BLTOUCH)
#include "../feature/bltouch.h"
@ -91,7 +91,7 @@ float probe_min_x() {
#if ENABLED(DELTA) || IS_SCARA
PROBE_X_MIN, MESH_MIN_X
#else
(X_MIN_BED) + (MIN_PROBE_EDGE), (X_MIN_POS) + zprobe_offset[X_AXIS]
(X_MIN_BED) + (MIN_PROBE_EDGE), (X_MIN_POS) + probe_offset[X_AXIS]
#endif
);
}
@ -100,7 +100,7 @@ float probe_max_x() {
#if ENABLED(DELTA) || IS_SCARA
PROBE_X_MAX, MESH_MAX_X
#else
(X_MAX_BED) - (MIN_PROBE_EDGE), (X_MAX_POS) + zprobe_offset[X_AXIS]
(X_MAX_BED) - (MIN_PROBE_EDGE), (X_MAX_POS) + probe_offset[X_AXIS]
#endif
);
}
@ -109,7 +109,7 @@ float probe_min_y() {
#if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MIN, MESH_MIN_Y
#else
(Y_MIN_BED) + (MIN_PROBE_EDGE), (Y_MIN_POS) + zprobe_offset[Y_AXIS]
(Y_MIN_BED) + (MIN_PROBE_EDGE), (Y_MIN_POS) + probe_offset[Y_AXIS]
#endif
);
}
@ -118,7 +118,7 @@ float probe_max_y() {
#if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MAX, MESH_MAX_Y
#else
(Y_MAX_BED) - (MIN_PROBE_EDGE), (Y_MAX_POS) + zprobe_offset[Y_AXIS]
(Y_MAX_BED) - (MIN_PROBE_EDGE), (Y_MAX_POS) + probe_offset[Y_AXIS]
#endif
);
}
@ -300,7 +300,7 @@ inline void do_probe_raise(const float z_raise) {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("do_probe_raise(", z_raise, ")");
float z_dest = z_raise;
if (zprobe_offset[Z_AXIS] < 0) z_dest -= zprobe_offset[Z_AXIS];
if (probe_offset[Z_AXIS] < 0) z_dest -= probe_offset[Z_AXIS];
NOMORE(z_dest, Z_MAX_POS);
@ -580,7 +580,7 @@ static float run_z_probe() {
// Stop the probe before it goes too low to prevent damage.
// If Z isn't known then probe to -10mm.
const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -zprobe_offset[Z_AXIS] + Z_PROBE_LOW_POINT : -10.0;
const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -probe_offset[Z_AXIS] + Z_PROBE_LOW_POINT : -10.0;
// Double-probing does a fast probe followed by a slow probe
#if TOTAL_PROBING == 2
@ -605,7 +605,7 @@ static float run_z_probe() {
// If the nozzle is well over the travel height then
// move down quickly before doing the slow probe
const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (zprobe_offset[Z_AXIS] < 0 ? -zprobe_offset[Z_AXIS] : 0);
const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (probe_offset[Z_AXIS] < 0 ? -probe_offset[Z_AXIS] : 0);
if (current_position[Z_AXIS] > z) {
// Probe down fast. If the probe never triggered, raise for probe clearance
if (!do_probe_move(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST)))
@ -735,8 +735,8 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
float nx = rx, ny = ry;
if (probe_relative) {
if (!position_is_reachable_by_probe(rx, ry)) return NAN; // The given position is in terms of the probe
nx -= zprobe_offset[X_AXIS]; // Get the nozzle position
ny -= zprobe_offset[Y_AXIS];
nx -= probe_offset[X_AXIS]; // Get the nozzle position
ny -= probe_offset[Y_AXIS];
}
else if (!position_is_reachable(nx, ny)) return NAN; // The given position is in terms of the nozzle
@ -757,7 +757,7 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_
float measured_z = NAN;
if (!DEPLOY_PROBE()) {
measured_z = run_z_probe() + zprobe_offset[Z_AXIS];
measured_z = run_z_probe() + probe_offset[Z_AXIS];
const bool big_raise = raise_after == PROBE_PT_BIG_RAISE;
if (big_raise || raise_after == PROBE_PT_RAISE)