Have run_probe() return probe Z, not nozzle Z
This commit is contained in:
parent
4487d22d56
commit
a5e085cbea
3 changed files with 8 additions and 11 deletions
|
@ -2233,7 +2233,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
SERIAL_ECHOLNPAIR(" Discrepancy:", first_probe_z - current_position[Z_AXIS]);
|
||||
}
|
||||
#endif
|
||||
return current_position[Z_AXIS];
|
||||
return current_position[Z_AXIS] + zprobe_zoffset;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2287,7 +2287,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
SERIAL_PROTOCOLPGM(" Y: ");
|
||||
SERIAL_PROTOCOL_F(y, 3);
|
||||
SERIAL_PROTOCOLPGM(" Z: ");
|
||||
SERIAL_PROTOCOL_F(FIXFLOAT(measured_z - -zprobe_zoffset), 3);
|
||||
SERIAL_PROTOCOL_F(FIXFLOAT(measured_z), 3);
|
||||
SERIAL_EOL;
|
||||
}
|
||||
|
||||
|
@ -4408,7 +4408,7 @@ inline void gcode_G28() {
|
|||
if ( NEAR(current_position[X_AXIS], xProbe - (X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
&& NEAR(current_position[Y_AXIS], yProbe - (Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
) {
|
||||
float simple_z = current_position[Z_AXIS] - (measured_z - (-zprobe_zoffset));
|
||||
float simple_z = current_position[Z_AXIS] - measured_z;
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("Z from Probe:", simple_z);
|
||||
|
@ -4503,7 +4503,7 @@ inline void gcode_G28() {
|
|||
SERIAL_PROTOCOLPGM(" Y: ");
|
||||
SERIAL_PROTOCOL(FIXFLOAT(Y_probe_location));
|
||||
SERIAL_PROTOCOLPGM(" Z: ");
|
||||
SERIAL_PROTOCOLLN(FIXFLOAT(measured_z - -zprobe_zoffset));
|
||||
SERIAL_PROTOCOLLN(FIXFLOAT(measured_z));
|
||||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
extern bool code_value_bool();
|
||||
extern bool code_has_value();
|
||||
extern float probe_pt(float x, float y, bool, int);
|
||||
extern float zprobe_zoffset;
|
||||
extern bool set_probe_deployed(bool);
|
||||
#define DEPLOY_PROBE() set_probe_deployed(true)
|
||||
#define STOW_PROBE() set_probe_deployed(false)
|
||||
|
@ -516,9 +515,9 @@
|
|||
}
|
||||
|
||||
if (code_seen('T')) {
|
||||
float z1 = probe_pt(ubl_3_point_1_X, ubl_3_point_1_Y, false /*Stow Flag*/, g29_verbose_level) + zprobe_zoffset,
|
||||
z2 = probe_pt(ubl_3_point_2_X, ubl_3_point_2_Y, false /*Stow Flag*/, g29_verbose_level) + zprobe_zoffset,
|
||||
z3 = probe_pt(ubl_3_point_3_X, ubl_3_point_3_Y, true /*Stow Flag*/, g29_verbose_level) + zprobe_zoffset;
|
||||
float z1 = probe_pt(ubl_3_point_1_X, ubl_3_point_1_Y, false /*Stow Flag*/, g29_verbose_level),
|
||||
z2 = probe_pt(ubl_3_point_2_X, ubl_3_point_2_Y, false /*Stow Flag*/, g29_verbose_level),
|
||||
z3 = probe_pt(ubl_3_point_3_X, ubl_3_point_3_Y, true /*Stow Flag*/, g29_verbose_level);
|
||||
|
||||
// We need to adjust z1, z2, z3 by the Mesh Height at these points. Just because they are non-zero doesn't mean
|
||||
// the Mesh is tilted! (We need to compensate each probe point by what the Mesh says that location's height is)
|
||||
|
@ -761,7 +760,7 @@
|
|||
goto LEAVE;
|
||||
}
|
||||
const float measured_z = probe_pt(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy), stow_probe, g29_verbose_level);
|
||||
ubl.z_values[location.x_index][location.y_index] = measured_z + zprobe_zoffset;
|
||||
ubl.z_values[location.x_index][location.y_index] = measured_z;
|
||||
}
|
||||
|
||||
if (do_ubl_mesh_map) ubl.display_map(map_type);
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
#include "configuration_store.h"
|
||||
#include "utility.h"
|
||||
|
||||
extern float zprobe_zoffset;
|
||||
|
||||
#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
|
||||
#include "buzzer.h"
|
||||
#endif
|
||||
|
|
Reference in a new issue