forked from upstream-mirrors/OpenTracks
Bugfix: removing sensor didn't remove the aggregator.
Introduced in 58d79380cf.
This commit is contained in:
@@ -164,24 +164,24 @@ public final class SensorDataSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void set(@NonNull Aggregator<?, ?> type, @Nullable Aggregator<?, ?> sensorData) {
|
private void set(@NonNull Aggregator<?, ?> type, @Nullable Aggregator<?, ?> sensorData) {
|
||||||
if (type instanceof AggregatorHeartRate hr) {
|
if (type instanceof AggregatorHeartRate) {
|
||||||
heartRate = hr;
|
heartRate = (AggregatorHeartRate) sensorData;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type instanceof AggregatorCyclingCadence cc) {
|
if (type instanceof AggregatorCyclingCadence) {
|
||||||
cyclingCadence = cc;
|
cyclingCadence = (AggregatorCyclingCadence) sensorData;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type instanceof AggregatorCyclingDistanceSpeed ds) {
|
if (type instanceof AggregatorCyclingDistanceSpeed) {
|
||||||
cyclingDistanceSpeed = ds;
|
cyclingDistanceSpeed = (AggregatorCyclingDistanceSpeed) sensorData;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type instanceof AggregatorCyclingPower cp) {
|
if (type instanceof AggregatorCyclingPower) {
|
||||||
cyclingPower = cp;
|
cyclingPower = (AggregatorCyclingPower) sensorData;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type instanceof AggregatorRunning rr) {
|
if (type instanceof AggregatorRunning) {
|
||||||
runningDistanceSpeedCadence = rr;
|
runningDistanceSpeedCadence = (AggregatorRunning) sensorData;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user