mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
[2.0.x] different bltouch init (#11135)
This commit is contained in:
parent
624986d423
commit
4237c3d9f8
@ -218,8 +218,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BLTOUCH)
|
#if ENABLED(BLTOUCH)
|
||||||
bltouch_command(BLTOUCH_RESET);
|
bltouch_init();
|
||||||
set_bltouch_deployed(false);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Always home with tool 0 active
|
// Always home with tool 0 active
|
||||||
|
@ -1117,16 +1117,9 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
|||||||
|
|
||||||
if (is_home_dir) {
|
if (is_home_dir) {
|
||||||
|
|
||||||
if (axis == Z_AXIS) {
|
#if HOMING_Z_WITH_PROBE && QUIET_PROBING
|
||||||
#if HOMING_Z_WITH_PROBE
|
if (axis == Z_AXIS) probing_pause(true);
|
||||||
#if ENABLED(BLTOUCH)
|
#endif
|
||||||
set_bltouch_deployed(true);
|
|
||||||
#endif
|
|
||||||
#if QUIET_PROBING
|
|
||||||
probing_pause(true);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable stealthChop if used. Enable diag1 pin on driver.
|
// Disable stealthChop if used. Enable diag1 pin on driver.
|
||||||
#if ENABLED(SENSORLESS_HOMING)
|
#if ENABLED(SENSORLESS_HOMING)
|
||||||
@ -1152,16 +1145,9 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
|||||||
|
|
||||||
if (is_home_dir) {
|
if (is_home_dir) {
|
||||||
|
|
||||||
if (axis == Z_AXIS) {
|
#if HOMING_Z_WITH_PROBE && QUIET_PROBING
|
||||||
#if HOMING_Z_WITH_PROBE
|
if (axis == Z_AXIS) probing_pause(false);
|
||||||
#if QUIET_PROBING
|
#endif
|
||||||
probing_pause(false);
|
|
||||||
#endif
|
|
||||||
#if ENABLED(BLTOUCH)
|
|
||||||
set_bltouch_deployed(false);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
endstops.validate_homing_move();
|
endstops.validate_homing_move();
|
||||||
|
|
||||||
@ -1336,6 +1322,10 @@ void homeaxis(const AxisEnum axis) {
|
|||||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:");
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:");
|
||||||
#endif
|
#endif
|
||||||
do_homing_move(axis, 1.5f * max_length(axis) * axis_home_dir);
|
do_homing_move(axis, 1.5f * max_length(axis) * axis_home_dir);
|
||||||
|
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
|
||||||
|
// BLTOUCH needs to be stowed after trigger to let rearm itself
|
||||||
|
if (axis == Z_AXIS) set_bltouch_deployed(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
// When homing Z with probe respect probe clearance
|
// When homing Z with probe respect probe clearance
|
||||||
const float bump = axis_home_dir * (
|
const float bump = axis_home_dir * (
|
||||||
@ -1361,9 +1351,19 @@ void homeaxis(const AxisEnum axis) {
|
|||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 2 Slow:");
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 2 Slow:");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
|
||||||
|
// BLTOUCH needs to deploy everytime
|
||||||
|
if (axis == Z_AXIS && set_bltouch_deployed(true)) return;
|
||||||
|
#endif
|
||||||
do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
|
do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put away the Z probe
|
||||||
|
#if HOMING_Z_WITH_PROBE
|
||||||
|
if (axis == Z_AXIS && STOW_PROBE()) return;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
const bool pos_dir = axis_home_dir > 0;
|
const bool pos_dir = axis_home_dir > 0;
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||||
@ -1436,11 +1436,6 @@ void homeaxis(const AxisEnum axis) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Put away the Z probe
|
|
||||||
#if HOMING_Z_WITH_PROBE
|
|
||||||
if (axis == Z_AXIS && STOW_PROBE()) return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Clear retracted status if homing the Z axis
|
// Clear retracted status if homing the Z axis
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
if (axis == Z_AXIS) fwretract.hop_amount = 0.0;
|
if (axis == Z_AXIS) fwretract.hop_amount = 0.0;
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
FORCE_INLINE void bltouch_init() {
|
FORCE_INLINE void bltouch_init() {
|
||||||
// Make sure any BLTouch error condition is cleared
|
// Make sure any BLTouch error condition is cleared
|
||||||
bltouch_command(BLTOUCH_RESET);
|
bltouch_command(BLTOUCH_RESET);
|
||||||
set_bltouch_deployed(true);
|
|
||||||
set_bltouch_deployed(false);
|
set_bltouch_deployed(false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user