From 94cfede7acca718f418fca5b70cbee025048b7e6 Mon Sep 17 00:00:00 2001 From: Roberto Viola Date: Tue, 17 Oct 2023 09:29:22 +0200 Subject: [PATCH] Conversion gain setting and conversion offset setting do not work with Tacx Neo 2 and Peloton. + resistance crashes when adjusted manually #1707 --- src/tacxneo2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tacxneo2.cpp b/src/tacxneo2.cpp index 39ade2c86..9baa336c6 100644 --- a/src/tacxneo2.cpp +++ b/src/tacxneo2.cpp @@ -578,7 +578,7 @@ void tacxneo2::controllerStateChanged(QLowEnergyController::ControllerState stat resistance_t tacxneo2::pelotonToBikeResistance(int pelotonResistance) { for (resistance_t i = 0; i < max_resistance; i++) { - if (bikeResistanceToPeloton(i) <= pelotonResistance && bikeResistanceToPeloton(i + 1) >= pelotonResistance) { + if (bikeResistanceToPeloton(i) <= pelotonResistance && bikeResistanceToPeloton(i + 1) > pelotonResistance) { return i; } }