forked from upstream-mirrors/OpenTracks
Revert "Bugfix: on idle detection reset movement-based sensor data."
This reverts commit fd9646bb1f.
This commit is contained in:
@@ -55,9 +55,7 @@ public abstract class Aggregator<Input, Output> {
|
|||||||
/**
|
/**
|
||||||
* Reset long term aggregated values (more than derived from previous SensorData). e.g. overall distance.
|
* Reset long term aggregated values (more than derived from previous SensorData). e.g. overall distance.
|
||||||
*/
|
*/
|
||||||
public void reset() {
|
public void reset() {}
|
||||||
value = getNoneValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the data recent considering the current time.
|
* Is the data recent considering the current time.
|
||||||
|
|||||||
@@ -37,5 +37,10 @@ public class AggregatorBarometer extends Aggregator<AtmosphericPressure, Altitud
|
|||||||
return new AltitudeGainLoss(0f, 0f);
|
return new AltitudeGainLoss(0f, 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
value = getNoneValue();
|
||||||
|
}
|
||||||
|
|
||||||
public record Data(Altitude gain, Altitude loss) {}
|
public record Data(Altitude gain, Altitude loss) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ public class AggregatorGPS extends Aggregator<Position, Position> {
|
|||||||
value = current.value();
|
value = current.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
value = null;
|
||||||
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
protected Position getNoneValue() {
|
protected Position getNoneValue() {
|
||||||
|
|||||||
@@ -15,11 +15,6 @@ public class AggregatorHeartRate extends Aggregator<HeartRate, HeartRate> {
|
|||||||
this.value = current.value();
|
this.value = current.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reset() {
|
|
||||||
// We don't need to reset the heart rate as this value is valid for a certain amount of time: and it is not an aggregate.
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
protected HeartRate getNoneValue() {
|
protected HeartRate getNoneValue() {
|
||||||
|
|||||||
Reference in New Issue
Block a user