Sensor data: use monotonic clock.

Part of #1966.
This commit is contained in:
Dennis Guse
2024-12-15 17:57:04 +01:00
parent a2a9132658
commit 333bc6f31b
11 changed files with 33 additions and 25 deletions
@@ -33,7 +33,7 @@ public class BluetoothHandlerCyclingCadence implements SensorHandlerInterface {
if (serviceMeasurementUUID.equals(BluetoothHandlerManagerCyclingPower.CYCLING_POWER)) {
BluetoothHandlerManagerCyclingPower.Data data = BluetoothHandlerManagerCyclingPower.parseCyclingPower(characteristic);
if (data != null && data.crank() != null) {
observer.onChange(new Raw<>(data.crank()));
observer.onChange(new Raw<>(observer.getNow(), data.crank()));
}
return;
}
@@ -42,7 +42,7 @@ public class BluetoothHandlerCyclingCadence implements SensorHandlerInterface {
Pair<BluetoothHandlerCyclingDistanceSpeed.WheelData, CrankData> data = BluetoothHandlerCyclingDistanceSpeed.parseCyclingCrankAndWheel(address, sensorName, characteristic);
if (data != null && data.second != null) {
observer.onChange(new Raw<>(data.second));
observer.onChange(new Raw<>(observer.getNow(), data.second));
}
return;
}