mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 15:26:18 +00:00
Fix G30 with limits, print correct probe XY
This commit is contained in:
parent
665b7f3893
commit
410657b050
@ -4241,8 +4241,12 @@ inline void gcode_G28() {
|
|||||||
* S = Stows the probe if 1 (default=1)
|
* S = Stows the probe if 1 (default=1)
|
||||||
*/
|
*/
|
||||||
inline void gcode_G30() {
|
inline void gcode_G30() {
|
||||||
float X_probe_location = code_seen('X') ? code_value_axis_units(X_AXIS) : current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER;
|
float X_probe_location = code_seen('X') ? code_value_axis_units(X_AXIS) : current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER,
|
||||||
float Y_probe_location = code_seen('Y') ? code_value_axis_units(Y_AXIS) : current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER;
|
Y_probe_location = code_seen('Y') ? code_value_axis_units(Y_AXIS) : current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER;
|
||||||
|
|
||||||
|
float pos[XYZ] = { X_probe_location, Y_probe_location, LOGICAL_Z_POSITION(0) };
|
||||||
|
if (!position_is_reachable(pos, true)) return;
|
||||||
|
|
||||||
bool stow = code_seen('S') ? code_value_bool() : true;
|
bool stow = code_seen('S') ? code_value_bool() : true;
|
||||||
|
|
||||||
// Disable leveling so the planner won't mess with us
|
// Disable leveling so the planner won't mess with us
|
||||||
@ -4252,17 +4256,14 @@ inline void gcode_G28() {
|
|||||||
|
|
||||||
setup_for_endstop_or_probe_move();
|
setup_for_endstop_or_probe_move();
|
||||||
|
|
||||||
float measured_z = probe_pt(X_probe_location,
|
float measured_z = probe_pt(X_probe_location, Y_probe_location, stow, 1);
|
||||||
Y_probe_location,
|
|
||||||
stow, 1);
|
|
||||||
|
|
||||||
SERIAL_PROTOCOLPGM("Bed X: ");
|
SERIAL_PROTOCOLPGM("Bed X: ");
|
||||||
SERIAL_PROTOCOL(current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER + 0.0001);
|
SERIAL_PROTOCOL(X_probe_location + 0.0001);
|
||||||
SERIAL_PROTOCOLPGM(" Y: ");
|
SERIAL_PROTOCOLPGM(" Y: ");
|
||||||
SERIAL_PROTOCOL(current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER + 0.0001);
|
SERIAL_PROTOCOL(Y_probe_location + 0.0001);
|
||||||
SERIAL_PROTOCOLPGM(" Z: ");
|
SERIAL_PROTOCOLPGM(" Z: ");
|
||||||
SERIAL_PROTOCOL(measured_z + 0.0001);
|
SERIAL_PROTOCOLLN(measured_z + 0.0001);
|
||||||
SERIAL_EOL;
|
|
||||||
|
|
||||||
clean_up_after_endstop_or_probe_move();
|
clean_up_after_endstop_or_probe_move();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user