✨ Bed Distance Sensor (#24554)
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user