Bed Distance Sensor (#24554)

This commit is contained in:
Mark
2022-08-06 14:14:58 +08:00
committed by GitHub
parent 1dc17aa64c
commit 83320f1052
25 changed files with 410 additions and 9 deletions

View File

@@ -121,6 +121,10 @@
#include "feature/bltouch.h"
#endif
#if ENABLED(BD_SENSOR)
#include "feature/bedlevel/bdl/bdl.h"
#endif
#if ENABLED(POLL_JOG)
#include "feature/joystick.h"
#endif
@@ -779,6 +783,9 @@ void idle(bool no_stepper_sleep/*=false*/) {
if (++idle_depth > 5) SERIAL_ECHOLNPGM("idle() call depth: ", idle_depth);
#endif
// Bed Distance Sensor task
TERN_(BD_SENSOR, bdl.process());
// Core Marlin activities
manage_inactivity(no_stepper_sleep);
@@ -1632,6 +1639,10 @@ void setup() {
SETUP_RUN(test_tmc_connection());
#endif
#if ENABLED(BD_SENSOR)
SETUP_RUN(bdl.init(I2C_BD_SDA_PIN, I2C_BD_SCL_PIN, I2C_BD_DELAY));
#endif
marlin_state = MF_RUNNING;
SETUP_LOG("setup() completed.");