Skip to content

Commit de3ea61

Browse files
cagnuleinclaude
andauthored
Fix compilation errors in virtualrower.cpp (#4229)
- Change ROWER to ROWING enum value (ROWER doesn't exist in BLUETOOTH_TYPE enum) - Fix missing closing parentheses in value.append() calls for strokeCount and paceSecs https://claude.ai/code/session_01RXrvrLYiy2o58H9YhtJfE8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2d53ebf commit de3ea61

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/virtualdevices/virtualrower.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void virtualrower::rowerProvider() {
339339

340340
// Get stroke count based on device type
341341
uint32_t strokeCount = 0;
342-
if (Rower->deviceType() == ROWER) {
342+
if (Rower->deviceType() == ROWING) {
343343
strokeCount = ((rower *)Rower)->currentStrokesCount().value();
344344
} else {
345345
// For bikes/other devices, estimate strokes from cadence
@@ -349,7 +349,7 @@ void virtualrower::rowerProvider() {
349349

350350
// Get pace based on device type
351351
uint16_t paceSecs = 0;
352-
if (Rower->deviceType() == ROWER) {
352+
if (Rower->deviceType() == ROWING) {
353353
paceSecs = QTime(0, 0, 0).secsTo(((rower *)Rower)->currentPace());
354354
} else {
355355
// For bikes, pace = odometer / moving_time in seconds
@@ -429,15 +429,15 @@ void virtualrower::rowerProvider() {
429429

430430
value.append((char)((uint8_t)(Rower->currentCadence().value() * 2) & 0xFF)); // Stroke Rate
431431

432-
value.append((char)((uint16_t)(strokeCount & 0xFF)); // Stroke Count
433-
value.append((char)(((uint16_t)(strokeCount >> 8) & 0xFF)); // Stroke Count
432+
value.append((char)((uint16_t)(strokeCount & 0xFF))); // Stroke Count
433+
value.append((char)(((uint16_t)(strokeCount >> 8) & 0xFF))); // Stroke Count
434434

435435
value.append((char)(((uint16_t)(Rower->odometer() * 1000.0)) & 0xFF)); // Distance
436436
value.append((char)(((uint16_t)(Rower->odometer() * 1000.0) >> 8) & 0xFF)); // Distance
437437
value.append((char)(((uint16_t)(Rower->odometer() * 1000.0) >> 16) & 0xFF)); // Distance
438438

439-
value.append((char)((uint16_t)(paceSecs & 0xFF)); // pace
440-
value.append((char)(((uint16_t)(paceSecs >> 8) & 0xFF)); // pace
439+
value.append((char)((uint16_t)(paceSecs & 0xFF))); // pace
440+
value.append((char)(((uint16_t)(paceSecs >> 8) & 0xFF))); // pace
441441

442442
value.append((char)(((uint16_t)Rower->wattsMetricforUI()) & 0xFF)); // watts
443443
value.append((char)(((uint16_t)Rower->wattsMetricforUI()) >> 8) & 0xFF); // watts

0 commit comments

Comments
 (0)