From aa60db6b007b120bdf7cc92ade9fd8383d404178 Mon Sep 17 00:00:00 2001 From: Roberto Viola Date: Mon, 4 Nov 2024 15:43:14 +0100 Subject: [PATCH] fixing maxing resistance --- src/devices/renphobike/renphobike.cpp | 5 ++++- src/devices/renphobike/renphobike.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/devices/renphobike/renphobike.cpp b/src/devices/renphobike/renphobike.cpp index 6d0ff8e5c..627604670 100644 --- a/src/devices/renphobike/renphobike.cpp +++ b/src/devices/renphobike/renphobike.cpp @@ -713,6 +713,7 @@ uint8_t renphobike::resistanceFromPowerRequest(uint16_t power) }*/ double renphobike::bikeResistanceToPeloton(double resistance) { + /* QSettings settings; bool renpho_peloton_conversion_v2 = settings.value(QZSettings::renpho_peloton_conversion_v2, QZSettings::default_renpho_peloton_conversion_v2) @@ -736,7 +737,9 @@ double renphobike::bikeResistanceToPeloton(double resistance) { if (p < 0) p = 0; return p; - } + }*/ + + return resistance * 4.0; } bool renphobike::connected() { diff --git a/src/devices/renphobike/renphobike.h b/src/devices/renphobike/renphobike.h index 99874ba59..adbe58f06 100644 --- a/src/devices/renphobike/renphobike.h +++ b/src/devices/renphobike/renphobike.h @@ -42,7 +42,7 @@ class renphobike : public bike { resistance_t maxResistance() override { return max_resistance; } private: - const resistance_t max_resistance = 80; + const resistance_t max_resistance = 24; double bikeResistanceToPeloton(double resistance); void writeCharacteristic(uint8_t *data, uint8_t data_len, QString info, bool disable_log = false, bool wait_for_response = false);