Tweak use of move_z_after_probing
This commit is contained in:
parent
c352954882
commit
bc45fb6b13
7 changed files with 14 additions and 9 deletions
|
@ -757,7 +757,10 @@
|
||||||
} while (location.x_index >= 0 && --count);
|
} while (location.x_index >= 0 && --count);
|
||||||
|
|
||||||
STOW_PROBE();
|
STOW_PROBE();
|
||||||
move_z_after_probing();
|
|
||||||
|
#if Z_AFTER_PROBING
|
||||||
|
move_z_after_probing();
|
||||||
|
#endif
|
||||||
|
|
||||||
restore_ubl_active_state_and_leave();
|
restore_ubl_active_state_and_leave();
|
||||||
|
|
||||||
|
|
|
@ -949,7 +949,7 @@ void GcodeSuite::G29() {
|
||||||
if (planner.leveling_active)
|
if (planner.leveling_active)
|
||||||
SYNC_PLAN_POSITION_KINEMATIC();
|
SYNC_PLAN_POSITION_KINEMATIC();
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE && Z_AFTER_PROBING
|
||||||
move_z_after_probing();
|
move_z_after_probing();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||||
HOMEAXIS(Z);
|
HOMEAXIS(Z);
|
||||||
#endif
|
#endif
|
||||||
} // home_all || homeZ
|
} // home_all || homeZ
|
||||||
#if HOMING_Z_WITH_PROBE
|
#if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
|
||||||
move_z_after_probing();
|
move_z_after_probing();
|
||||||
#endif
|
#endif
|
||||||
#endif // Z_HOME_DIR < 0
|
#endif // Z_HOME_DIR < 0
|
||||||
|
|
|
@ -62,7 +62,9 @@ void GcodeSuite::G30() {
|
||||||
|
|
||||||
clean_up_after_endstop_or_probe_move();
|
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();
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,9 @@ void GcodeSuite::M401() {
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M402() {
|
void GcodeSuite::M402() {
|
||||||
STOW_PROBE();
|
STOW_PROBE();
|
||||||
move_z_after_probing();
|
#if Z_AFTER_PROBING
|
||||||
|
move_z_after_probing();
|
||||||
|
#endif
|
||||||
report_current_position();
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,7 @@ bool set_probe_deployed(const bool deploy) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Z_AFTER_PROBING
|
#if Z_AFTER_PROBING
|
||||||
// After probing move to a preferred Z position
|
// After probing move to a preferred Z position
|
||||||
void move_z_after_probing() {
|
void move_z_after_probing() {
|
||||||
if (current_position[Z_AXIS] != Z_AFTER_PROBING) {
|
if (current_position[Z_AXIS] != Z_AFTER_PROBING) {
|
||||||
|
|
|
@ -32,10 +32,8 @@
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
extern float zprobe_zoffset;
|
extern float zprobe_zoffset;
|
||||||
bool set_probe_deployed(const bool deploy);
|
bool set_probe_deployed(const bool deploy);
|
||||||
#ifdef Z_AFTER_PROBING
|
#if Z_AFTER_PROBING
|
||||||
void move_z_after_probing();
|
void move_z_after_probing();
|
||||||
#else
|
|
||||||
inline void move_z_after_probing() {}
|
|
||||||
#endif
|
#endif
|
||||||
enum ProbePtRaise : unsigned char {
|
enum ProbePtRaise : unsigned char {
|
||||||
PROBE_PT_NONE, // No raise or stow after run_z_probe
|
PROBE_PT_NONE, // No raise or stow after run_z_probe
|
||||||
|
|
Reference in a new issue