Skip to content

Commit 8145d5c

Browse files
cagnuleinclaude
andcommitted
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 <noreply@anthropic.com>
1 parent cc7cc8f commit 8145d5c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/devices/sportsplusrower/sportsplusrower.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,20 @@ void sportsplusrower::characteristicChanged(const QLowEnergyCharacteristic &char
136136
double kcal = 0;
137137
bool cadence_eval = false;
138138

139-
m_watt = ((newValue.at(10) >> 4) * 10) + (newValue.at(10) & 0x0F);
140-
emit debug(QStringLiteral("Current watt: ") + QString::number(m_watt.value()));
141-
142139
if(newValue.at(1) == 0x10) {
143140
Cadence = ((newValue.at(3) >> 4) * 10) + (newValue.at(3) & 0x0F);
144141
Speed = 0.37497622 * ((double)Cadence.value());
145142
emit debug(QStringLiteral("Current speed: ") + QString::number(Speed.value()));
146143
}
147144

145+
if (Speed.value() > 0) {
146+
double paceSeconds = 1800.0 / Speed.value();
147+
m_watt = rower::calculateWattsFromPace(paceSeconds);
148+
} else {
149+
m_watt = 0;
150+
}
151+
emit debug(QStringLiteral("Current watt: ") + QString::number(m_watt.value()));
152+
148153
if (!firstCharChanged) {
149154
double elapsedMs = lastTimeCharChanged.msecsTo(now);
150155
Distance += ((Speed.value() / 3600.0) / (1000.0 / elapsedMs));

0 commit comments

Comments
 (0)