BLE: decode cadence from cycling powermeter.

Part of #1352.
This commit is contained in:
Dennis Guse
2022-08-16 20:33:54 +02:00
parent 8696a15ce7
commit 7d804b603d
5 changed files with 88 additions and 18 deletions
@@ -254,9 +254,9 @@ public abstract class BluetoothConnectionManager<DataType> {
@Override
protected SensorDataCyclingPower parsePayload(String sensorName, String address, BluetoothGattCharacteristic characteristic) {
Integer cyclingPower = BluetoothUtils.parseCyclingPower(characteristic);
SensorDataCyclingPower.Data cyclingPower = BluetoothUtils.parseCyclingPower(characteristic);
return cyclingPower != null ? new SensorDataCyclingPower(address, sensorName, Power.of(cyclingPower)) : null;
return cyclingPower != null ? new SensorDataCyclingPower(address, sensorName, cyclingPower.getPower()) : null;
}
}