From 617336e5752ce05bee12fb8e96ffae8e2d91ff3c Mon Sep 17 00:00:00 2001 From: doudar Date: Fri, 19 Jan 2024 18:35:00 -0600 Subject: [PATCH] TrainerDay Fix Hopefully fixes the rapid ERG issue with TrainerDay. --- CHANGELOG.md | 3 ++- src/ERG_Mode.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa89a9e..bb70f85c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed DNS server in AP mode. - Fixed an issue with IC4 and variants not displaying device name in Bluetooth scanner. Fixes #500 - Switched from using Power Table to a Torque Table for better compensation in cad variations. -- added test for invalid Peloton data to keep stepper from running away without resistance information. +- added test for invalid Peloton data to keep stepper from running away without resistance information. +- Fixed a bug with Trainer Day and rapid ERG sending. ### Hardware - Wire diameter reduced from 7.2mm to 6.0mm on the window passthrough to accommodate the latest batch of cables. diff --git a/src/ERG_Mode.cpp b/src/ERG_Mode.cpp index b3ebc6e6..fa8b2e47 100644 --- a/src/ERG_Mode.cpp +++ b/src/ERG_Mode.cpp @@ -549,7 +549,7 @@ void ErgMode::computeErg() { int newCadence = rtConfig.cad.getValue(); // check for new torque value or new set point, if watts < 10 treat as faulty - if ((this->watts.getTimestamp() == newWatts.getTimestamp() && this->setPoint == newWatts.getTarget()) || newWatts.getValue() < 10) { + if ((this->watts.getTimestamp() == newWatts.getTimestamp() || this->setPoint == newWatts.getTarget()) || newWatts.getValue() < 10) { SS2K_LOGW(ERG_MODE_LOG_TAG, "Watts previously processed."); return; }