diff --git a/CHANGELOG.md b/CHANGELOG.md index bb18c1f6..bb76fad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Multiple Homing refinements. - Working with resistance mode on QZ & Peloton +- Check for cadence (before homing) so that we don't home when nobody is around. +- Don't depower the stepper if there is cadence. ### Hardware diff --git a/src/BLE_Client.cpp b/src/BLE_Client.cpp index c1e83288..67ef9ded 100644 --- a/src/BLE_Client.cpp +++ b/src/BLE_Client.cpp @@ -107,7 +107,8 @@ void bleClientTask(void *pvParameters) { } } // Spin Down process for the Server. It's here because it needs to be non-blocking for the maintenance loop. - if (spinBLEServer.spinDownFlag) { + // Checking for cadence also so that we don't home when nobody is around. + if (spinBLEServer.spinDownFlag && rtConfig->cad.getValue()) { if (spinBLEServer.spinDownFlag >= 2) { // Home Both Directions ss2k->goHome(true); } else { // Startup Homing diff --git a/src/Main.cpp b/src/Main.cpp index 477b2612..49f80c72 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -468,7 +468,11 @@ void SS2K::moveStepper() { } } - if (connectedClientCount() > 0) { + if (rtConfig->cad.getValue() > 1) { + stepper->enableOutputs(); + stepper->setAutoEnable(false); + }else{ + stepper->setAutoEnable(true); } if (_stepperDir != userConfig->getStepperDir()) { // User changed the config direction of the stepper wires