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

@ -49,8 +49,8 @@ void GcodeSuite::G42() {
if (hasJ) destination[Y_AXIS] = _GET_MESH_Y(iy);
#if HAS_BED_PROBE
if (parser.boolval('P')) {
if (hasI) destination[X_AXIS] -= zprobe_offset[X_AXIS];
if (hasJ) destination[Y_AXIS] -= zprobe_offset[Y_AXIS];
if (hasI) destination[X_AXIS] -= probe_offset[X_AXIS];
if (hasJ) destination[Y_AXIS] -= probe_offset[Y_AXIS];
}
#endif

View File

@ -947,8 +947,8 @@ G29_TYPE GcodeSuite::G29() {
planner.leveling_active = false;
// Use the last measured distance to the bed, if possible
if ( NEAR(current_position[X_AXIS], xProbe - zprobe_offset[X_AXIS])
&& NEAR(current_position[Y_AXIS], yProbe - zprobe_offset[Y_AXIS])
if ( NEAR(current_position[X_AXIS], xProbe - probe_offset[X_AXIS])
&& NEAR(current_position[Y_AXIS], yProbe - probe_offset[Y_AXIS])
) {
const float simple_z = current_position[Z_AXIS] - measured_z;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted[Z_AXIS], " Discrepancy ", simple_z - converted[Z_AXIS]);

View File

@ -136,8 +136,8 @@
destination[Z_AXIS] = current_position[Z_AXIS]; // Z is already at the right height
#if HOMING_Z_WITH_PROBE
destination[X_AXIS] -= zprobe_offset[X_AXIS];
destination[Y_AXIS] -= zprobe_offset[Y_AXIS];
destination[X_AXIS] -= probe_offset[X_AXIS];
destination[Y_AXIS] -= probe_offset[Y_AXIS];
#endif
if (position_is_reachable(destination[X_AXIS], destination[Y_AXIS])) {

View File

@ -77,8 +77,8 @@ void GcodeSuite::M48() {
float X_current = current_position[X_AXIS],
Y_current = current_position[Y_AXIS];
const float X_probe_location = parser.linearval('X', X_current + zprobe_offset[X_AXIS]),
Y_probe_location = parser.linearval('Y', Y_current + zprobe_offset[Y_AXIS]);
const float X_probe_location = parser.linearval('X', X_current + probe_offset[X_AXIS]),
Y_probe_location = parser.linearval('Y', Y_current + probe_offset[Y_AXIS]);
if (!position_is_reachable_by_probe(X_probe_location, Y_probe_location)) {
SERIAL_ECHOLNPGM("? (X,Y) out of bounds.");
@ -165,8 +165,8 @@ 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.
X_current = X_probe_location - zprobe_offset[X_AXIS] + cos(RADIANS(angle)) * radius;
Y_current = Y_probe_location - zprobe_offset[Y_AXIS] + sin(RADIANS(angle)) * radius;
X_current = X_probe_location - probe_offset[X_AXIS] + cos(RADIANS(angle)) * radius;
Y_current = Y_probe_location - probe_offset[Y_AXIS] + sin(RADIANS(angle)) * radius;
#if DISABLED(DELTA)
LIMIT(X_current, X_MIN_POS, X_MAX_POS);

View File

@ -42,9 +42,9 @@
&& active_extruder == 0
#endif
) {
zprobe_offset[Z_AXIS] += offs;
probe_offset[Z_AXIS] += offs;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", zprobe_offset[Z_AXIS]);
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", probe_offset[Z_AXIS]);
}
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
else {

View File

@ -39,8 +39,8 @@
* E Engage the probe for each probe (default 1)
*/
void GcodeSuite::G30() {
const float xpos = parser.linearval('X', current_position[X_AXIS] + zprobe_offset[X_AXIS]),
ypos = parser.linearval('Y', current_position[Y_AXIS] + zprobe_offset[Y_AXIS]);
const float xpos = parser.linearval('X', current_position[X_AXIS] + probe_offset[X_AXIS]),
ypos = parser.linearval('Y', current_position[Y_AXIS] + probe_offset[Y_AXIS]);
if (!position_is_reachable_by_probe(xpos, ypos)) return;

View File

@ -36,17 +36,17 @@ void GcodeSuite::M851() {
// Show usage with no parameters
if (!parser.seen("XYZ")) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " X", zprobe_offset[X_AXIS],
" Y", zprobe_offset[Y_AXIS],
" Z", zprobe_offset[Z_AXIS]);
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " X", probe_offset[X_AXIS],
" Y", probe_offset[Y_AXIS],
" Z", probe_offset[Z_AXIS]);
return;
}
// Get the modified offsets
const float offs[] = {
parser.floatval('X', zprobe_offset[X_AXIS]),
parser.floatval('Y', zprobe_offset[Y_AXIS]),
parser.floatval('Z', zprobe_offset[Z_AXIS])
parser.floatval('X', probe_offset[X_AXIS]),
parser.floatval('Y', probe_offset[Y_AXIS]),
parser.floatval('Z', probe_offset[Z_AXIS])
};
// Error-check
@ -64,7 +64,7 @@ void GcodeSuite::M851() {
}
// Save the new offsets
LOOP_XYZ(a) zprobe_offset[a] = offs[a];
LOOP_XYZ(a) probe_offset[a] = offs[a];
}
#endif // HAS_BED_PROBE