Skip to content

Commit b130082

Browse files
committed
Fix Stryd5 Indoor mode characteristic UUID
The mode-switch write was targeting 7e78aa18, which is the service UUID, not a characteristic UUID - the service only exposes two characteristics, 7e78aa20 (write, handle 33) and 7e78aa19 (notify, handle 35), confirmed from Andrea's GATT discovery log. The write never matched any characteristic, so the mode switch silently never fired. Target 7e78aa20 instead. Refs #4480
1 parent 01cac33 commit b130082

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/devices/strydrunpowersensor/strydrunpowersensor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ void strydrunpowersensor::characteristicChanged(const QLowEnergyCharacteristic &
525525
qDebug() << QStringLiteral("Current VerticalOscillationMM:") << VerticalOscillationMM.value();
526526
} else if (strydIndoorModeRequested && newValue.length() >= 3 && (uint8_t)newValue.at(0) == 0x15 &&
527527
(uint8_t)newValue.at(1) == 0x00) {
528-
// ack of the 15 00/15 01 mode switch written to 7e78aa18: byte 2 echoes back the confirmed
528+
// ack of the 15 00/15 01 mode switch written to 7e78aa20: byte 2 echoes back the confirmed
529529
// mode (0x00 = Indoor, 0x01 = Outdoor)
530530
uint8_t confirmedMode = (uint8_t)newValue.at(2);
531531
if (confirmedMode == 0x00) {
@@ -620,7 +620,7 @@ void strydrunpowersensor::stateChanged(QLowEnergyService::ServiceState state) {
620620
// formula. Switching the pod to Indoor mode makes it stop compensating for incline on its
621621
// own, leaving QZ's formula as the only source of the incline adjustment.
622622
if (bluetoothDevice.name().startsWith(QStringLiteral("Stryd5"), Qt::CaseInsensitive) &&
623-
c.uuid() == QBluetoothUuid(QStringLiteral("7e78aa18-72cd-d3b8-a81f-5b7e589bea0f")) &&
623+
c.uuid() == QBluetoothUuid(QStringLiteral("7e78aa20-72cd-d3b8-a81f-5b7e589bea0f")) &&
624624
(c.properties() & QLowEnergyCharacteristic::Write)) {
625625
strydIndoorModeService = s;
626626
strydIndoorModeChar = c;

0 commit comments

Comments
 (0)