mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-18 15:39:31 +00:00
Tweak use of move_z_after_probing
This commit is contained in:
parent
e5fbbbc068
commit
d9e1cbebea
3 changed files with 18 additions and 10 deletions
|
@ -384,10 +384,8 @@ void report_current_position();
|
|||
#if HAS_BED_PROBE
|
||||
extern float zprobe_zoffset;
|
||||
bool set_probe_deployed(const bool deploy);
|
||||
#ifdef Z_AFTER_PROBING
|
||||
#if Z_AFTER_PROBING
|
||||
void move_z_after_probing();
|
||||
#else
|
||||
inline void move_z_after_probing() {}
|
||||
#endif
|
||||
enum ProbePtRaise : unsigned char {
|
||||
PROBE_PT_NONE, // No raise or stow after run_z_probe
|
||||
|
|
|
@ -3851,7 +3851,7 @@ inline void gcode_G4() {
|
|||
|
||||
#endif // DELTA
|
||||
|
||||
#ifdef Z_AFTER_PROBING
|
||||
#if Z_AFTER_PROBING
|
||||
void move_z_after_probing() {
|
||||
if (current_position[Z_AXIS] != Z_AFTER_PROBING) {
|
||||
do_blocking_move_to_z(Z_AFTER_PROBING);
|
||||
|
@ -4092,7 +4092,7 @@ inline void gcode_G28(const bool always_home_all) {
|
|||
HOMEAXIS(Z);
|
||||
#endif
|
||||
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
#if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
|
||||
move_z_after_probing();
|
||||
#endif
|
||||
|
||||
|
@ -5249,7 +5249,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||
if (planner.leveling_active)
|
||||
SYNC_PLAN_POSITION_KINEMATIC();
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#if HAS_BED_PROBE && Z_AFTER_PROBING
|
||||
move_z_after_probing();
|
||||
#endif
|
||||
|
||||
|
@ -5293,7 +5293,9 @@ void home_all_axes() { gcode_G28(true); }
|
|||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
|
||||
if (raise_after == PROBE_PT_STOW) move_z_after_probing();
|
||||
#if Z_AFTER_PROBING
|
||||
if (raise_after == PROBE_PT_STOW) move_z_after_probing();
|
||||
#endif
|
||||
|
||||
report_current_position();
|
||||
}
|
||||
|
@ -7599,7 +7601,10 @@ inline void gcode_M42() {
|
|||
set_bed_leveling_enabled(was_enabled);
|
||||
#endif
|
||||
|
||||
move_z_after_probing();
|
||||
#if Z_AFTER_PROBING
|
||||
move_z_after_probing();
|
||||
#endif
|
||||
|
||||
report_current_position();
|
||||
}
|
||||
|
||||
|
@ -9687,7 +9692,9 @@ inline void gcode_M400() { stepper.synchronize(); }
|
|||
*/
|
||||
inline void gcode_M402() {
|
||||
STOW_PROBE();
|
||||
move_z_after_probing();
|
||||
#if Z_AFTER_PROBING
|
||||
move_z_after_probing();
|
||||
#endif
|
||||
report_current_position();
|
||||
}
|
||||
|
||||
|
|
|
@ -752,7 +752,10 @@
|
|||
} while (location.x_index >= 0 && --max_iterations);
|
||||
|
||||
STOW_PROBE();
|
||||
move_z_after_probing();
|
||||
|
||||
#if Z_AFTER_PROBING
|
||||
move_z_after_probing();
|
||||
#endif
|
||||
|
||||
restore_ubl_active_state_and_leave();
|
||||
|
||||
|
|
Loading…
Reference in a new issue