From 5a149fe7914146fd4f9e3f0831457fff26967ca1 Mon Sep 17 00:00:00 2001 From: doudar Date: Fri, 20 Oct 2023 17:17:50 -0500 Subject: [PATCH] MIN_ERG_CADENCE created and changed from 20 to 30. --- CHANGELOG.md | 1 + include/settings.h | 3 +++ src/ERG_Mode.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 215e8a14..5e5ba92a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Updated communications overview picture. - Updated kit purchasing links. +- MIN_ERG_CADENCE created and changed from 20 to 30. ### Hardware - Wire diameter reduced from 7.2mm to 6.0mm on the window passthrough to accommodate the latest batch of cables. diff --git a/include/settings.h b/include/settings.h index 91bf90bc..a84a00ad 100644 --- a/include/settings.h +++ b/include/settings.h @@ -79,6 +79,9 @@ // Amount to change watt target per shift in ERG mode. #define ERG_PER_SHIFT 10 +//Minimum cadence where ERG mode stops. +#define MIN_ERG_CADENCE 30 + // Default Min Watts to stop stepper. // This is used to set the lower travel limit for the motor. #define DEFAULT_MIN_WATTS 50 diff --git a/src/ERG_Mode.cpp b/src/ERG_Mode.cpp index 82e80a50..5e303a41 100644 --- a/src/ERG_Mode.cpp +++ b/src/ERG_Mode.cpp @@ -510,7 +510,7 @@ void ErgMode::_updateValues(int newCadence, Measurement& newWatts, float newIncl } bool ErgMode::_userIsSpinning(int cadence, float incline) { - if (cadence <= 20) { + if (cadence <= MIN_ERG_CADENCE) { if (!this->engineStopped) { // Test so motor stop command only happens once. ss2k.motorStop(); // release tension rtConfig.setTargetIncline(incline - WATTS_PER_SHIFT); // release incline