mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Manual Bed Leveling: Goto previous Z height at each probe point
This commit is contained in:
parent
ff06e1a030
commit
894608f8a3
@ -3998,10 +3998,10 @@ void home_all_axes() { gcode_G28(true); }
|
||||
|
||||
inline void _manual_goto_xy(const float &x, const float &y) {
|
||||
const float old_feedrate_mm_s = feedrate_mm_s;
|
||||
|
||||
#if MANUAL_PROBE_HEIGHT > 0
|
||||
const float prev_z = current_position[Z_AXIS];
|
||||
feedrate_mm_s = homing_feedrate(Z_AXIS);
|
||||
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
|
||||
current_position[Z_AXIS] = LOGICAL_Z_POSITION(MANUAL_PROBE_HEIGHT);
|
||||
line_to_current_position();
|
||||
#endif
|
||||
|
||||
@ -4012,7 +4012,7 @@ void home_all_axes() { gcode_G28(true); }
|
||||
|
||||
#if MANUAL_PROBE_HEIGHT > 0
|
||||
feedrate_mm_s = homing_feedrate(Z_AXIS);
|
||||
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); // just slightly over the bed
|
||||
current_position[Z_AXIS] = prev_z; // move back to the previous Z.
|
||||
line_to_current_position();
|
||||
#endif
|
||||
|
||||
|
@ -1586,13 +1586,14 @@ void kill_screen(const char* lcd_msg) {
|
||||
// Utility to go to the next mesh point
|
||||
inline void _manual_probe_goto_xy(float x, float y) {
|
||||
#if MANUAL_PROBE_HEIGHT > 0
|
||||
const float prev_z = current_position[Z_AXIS];
|
||||
line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT);
|
||||
#endif
|
||||
current_position[X_AXIS] = LOGICAL_X_POSITION(x);
|
||||
current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
|
||||
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
|
||||
#if MANUAL_PROBE_HEIGHT > 0
|
||||
line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS));
|
||||
line_to_z(prev_z);
|
||||
#endif
|
||||
lcd_synchronize();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user