Skip to content

Commit

Permalink
Update virtualtreadmill.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Jan 7, 2024
1 parent 10baf6f commit 89b9dd9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/virtualtreadmill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,18 @@ virtualtreadmill::virtualtreadmill(bluetoothdevice *t, bool noHeartService) {
}

#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
qDebug() << "Raspberry workaround for sending metrics to the peloton app"
QLowEnergyCharacteristicData charDataFIT;
charDataFIT.setUuid((QBluetoothUuid::CharacteristicType)0x2A00);
QByteArray valueFIT;
valueFIT.append((char)'Q');
valueFIT.append((char)'Z');
valueFIT.append((char)'-');
valueFIT.append((char)'R');
valueFIT.append((char)'P');
valueFIT.append((char)'I');
valueFIT.append((char)'P'); // average speed, cadence and resistance level supported
valueFIT.append((char)'i'); // heart rate and elapsed time
valueFIT.append((char)'x');
valueFIT.append((char)'e');
valueFIT.append((char)'l'); // resistance and power target supported
valueFIT.append((char)' '); // indoor simulation, wheel and spin down supported
valueFIT.append((char)'6');
valueFIT.append((char)'a');
valueFIT.append((char)0x00);
charDataFIT.setValue(valueFIT);
charDataFIT.setProperties(QLowEnergyCharacteristic::Read);
Expand Down

0 comments on commit 89b9dd9

Please sign in to comment.