From cc7cc8feed4b128c498d1593190400b694b0241b Mon Sep 17 00:00:00 2001 From: Roberto Viola Date: Fri, 17 Jul 2026 11:15:12 +0200 Subject: [PATCH 1/2] fix: sportsplusrower KCal accumulation was reset to 0 every packet KCal = kcal assigned a local variable (reset to 0 each characteristicChanged call), causing calorie counter to stay at ~0 throughout the session. Changed to KCal += kcal so calories accumulate over time. Fixes calorie counter at 0 for CARE Jet 600 rower and all sportsplusrower devices. Co-Authored-By: Claude Sonnet 4.6 --- src/devices/sportsplusrower/sportsplusrower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/sportsplusrower/sportsplusrower.cpp b/src/devices/sportsplusrower/sportsplusrower.cpp index 184be0df03..bc0fe4d10d 100644 --- a/src/devices/sportsplusrower/sportsplusrower.cpp +++ b/src/devices/sportsplusrower/sportsplusrower.cpp @@ -186,7 +186,7 @@ void sportsplusrower::characteristicChanged(const QLowEnergyCharacteristic &char } Resistance = requestResistance; - KCal = kcal; + KCal += kcal; if (settings.value(QZSettings::cadence_sensor_name, QZSettings::default_cadence_sensor_name) .toString() .startsWith(QStringLiteral("Disabled"))) { From 8145d5c20fc027be6a4696c6c97a02930ddbdc19 Mon Sep 17 00:00:00 2001 From: Roberto Viola Date: Fri, 17 Jul 2026 11:21:45 +0200 Subject: [PATCH 2/2] fix: sportsplusrower use Concept2 watt formula instead of device byte CARE Jet 600 rower (CARE10692135) reports only 8-17W via BLE (byte[10] BCD), which is unrealistically low. Replace with the Concept2 rowing power formula used in the rower base class: Watts = 2.8 * (500 / paceSeconds)^3. Speed is already derived from cadence SPM, pace is computed as 1800/speed_km_h. Also move cadence/speed update before watt calculation so watts use the fresh speed value from the current 0x10 subtype packet. Co-Authored-By: Claude Sonnet 4.6 --- src/devices/sportsplusrower/sportsplusrower.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/devices/sportsplusrower/sportsplusrower.cpp b/src/devices/sportsplusrower/sportsplusrower.cpp index bc0fe4d10d..ea50bac1da 100644 --- a/src/devices/sportsplusrower/sportsplusrower.cpp +++ b/src/devices/sportsplusrower/sportsplusrower.cpp @@ -136,15 +136,20 @@ void sportsplusrower::characteristicChanged(const QLowEnergyCharacteristic &char double kcal = 0; bool cadence_eval = false; - m_watt = ((newValue.at(10) >> 4) * 10) + (newValue.at(10) & 0x0F); - emit debug(QStringLiteral("Current watt: ") + QString::number(m_watt.value())); - if(newValue.at(1) == 0x10) { Cadence = ((newValue.at(3) >> 4) * 10) + (newValue.at(3) & 0x0F); Speed = 0.37497622 * ((double)Cadence.value()); emit debug(QStringLiteral("Current speed: ") + QString::number(Speed.value())); } + if (Speed.value() > 0) { + double paceSeconds = 1800.0 / Speed.value(); + m_watt = rower::calculateWattsFromPace(paceSeconds); + } else { + m_watt = 0; + } + emit debug(QStringLiteral("Current watt: ") + QString::number(m_watt.value())); + if (!firstCharChanged) { double elapsedMs = lastTimeCharChanged.msecsTo(now); Distance += ((Speed.value() / 3600.0) / (1000.0 / elapsedMs));