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
@@ -34,7 +34,7 @@ public class BluetoothHandlerCyclingDistanceSpeed implements SensorHandlerInterf
public void handlePayload(SensorManager.SensorDataChangedObserver observer, ServiceMeasurementUUID serviceMeasurementUUID, String sensorName, String address, BluetoothGattCharacteristic characteristic) {
Pair<WheelData, BluetoothHandlerCyclingCadence.CrankData> data = parseCyclingCrankAndWheel(address, sensorName, characteristic);
if (data.first != null) {
observer.onChange(new Raw<>(data.first));
observer.onChange(new Raw<>(observer.getNow(), data.first));
}
}