From de9ab0ca51ffe3debbdc060c43170bb157246dd2 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sat, 6 Jun 2026 18:35:00 +0000 Subject: [PATCH] Set Cycling Power Feature characteristic to advertise Cumulative Torque and Power Output --- cmd/bridge/bluetooth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/bridge/bluetooth.go b/cmd/bridge/bluetooth.go index e0cc0ae..383791e 100644 --- a/cmd/bridge/bluetooth.go +++ b/cmd/bridge/bluetooth.go @@ -13,6 +13,8 @@ const ( bleCyclingPowerFeatureCharacteristic = 0x2A65 // BLE Cycling Power Feature characteristic bleCyclingPowerMeasurementCharacteristic = 0x2A63 // BLE Cycling Power Measurement characteristic bleSignalDetectedFlag = 0x20 // Signal Detected bit in BLE payload header + bleCyclingPowerFeatureCumulativeTorque = 0x01 // Cumulative Torque feature bit + bleCyclingPowerFeaturePowerOutput = 0x02 // Power Output feature bit ) var adapter = bluetooth.DefaultAdapter @@ -34,7 +36,7 @@ func ExposeBluetooth(events <-chan Event) { { UUID: bluetooth.New16BitUUID(bleCyclingPowerFeatureCharacteristic), Flags: bluetooth.CharacteristicReadPermission, - Value: []byte{0, 0, 0, 0}, + Value: []byte{bleCyclingPowerFeatureCumulativeTorque | bleCyclingPowerFeaturePowerOutput, 0, 0, 0}, }, { UUID: bluetooth.New16BitUUID(bleCyclingPowerMeasurementCharacteristic),