Skip to content

Commit

Permalink
Merge pull request #596 from doudar/CadToHome
Browse files Browse the repository at this point in the history
Check for cadence also so that we don't home when nobody is around.
  • Loading branch information
doudar authored Nov 16, 2024
2 parents 83ac674 + c155af0 commit bd11ae6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

### Changed

### Hardware


## [24.11.10]

### Added

### 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

Expand Down
3 changes: 2 additions & 1 deletion src/BLE_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd11ae6

Please sign in to comment.