🚸 Bed distance sensor improvements (#25847)

This commit is contained in:
Mark
2023-06-18 17:18:08 +08:00
committed by GitHub
parent dd1792bdfc
commit 441416728c
12 changed files with 271 additions and 123 deletions

View File

@@ -73,6 +73,11 @@
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../core/debug_out.h"
#if ENABLED(BD_SENSOR)
#include "../feature/bedlevel/bdl/bdl.h"
#endif
// Relative Mode. Enable with G91, disable with G90.
bool relative_mode; // = false;
@@ -2131,6 +2136,7 @@ void prepare_line_to_destination() {
if (axis == Z_AXIS) {
if (TERN0(BLTOUCH, bltouch.deploy())) return; // BLTouch was deployed above, but get the alarm state.
if (TERN0(PROBE_TARE, probe.tare())) return;
TERN_(BD_SENSOR, bdl.config_state = BDS_HOMING_Z);
}
#endif
@@ -2381,6 +2387,10 @@ void prepare_line_to_destination() {
#endif
#if ALL(BD_SENSOR, HOMING_Z_WITH_PROBE)
if (axis == Z_AXIS) bdl.config_state = BDS_IDLE;
#endif
// Put away the Z probe
if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.stow())) return;