Move isIdle to TrackStatisticsUpdater.

This commit is contained in:
Dennis Guse
2025-11-18 06:18:34 +01:00
parent a310f773a1
commit 911f2c525f
2 changed files with 7 additions and 20 deletions
@@ -67,8 +67,6 @@ public class SegmentStatisticUpdater {
private HeartRate avgHeartRate = null;
private Power avgPower = null;
private boolean isIdle;
public SegmentStatisticUpdater() {
reset();
}
@@ -80,7 +78,6 @@ public class SegmentStatisticUpdater {
*/
public SegmentStatisticUpdater(SegmentStatisticUpdater other) {
this(other.getStatistics());
this.isIdle = other.isIdle();
}
public SegmentStatisticUpdater(Statistics statistics) {
@@ -120,8 +117,6 @@ public class SegmentStatisticUpdater {
stopTime = stopTime.isAfter(other.stopTime) ? stopTime : other.stopTime;
}
isIdle = other.isIdle; //TODO This implicitly assumes append mode.
if (avgHeartRate == null) {
avgHeartRate = other.avgHeartRate;
} else {
@@ -190,8 +185,6 @@ public class SegmentStatisticUpdater {
maxSpeed = Speed.ZERO;
totalAltitudeGain_m = null;
totalAltitudeLoss_m = null;
isIdle = false;
}
public void reset(Instant startTime) {
@@ -256,14 +249,6 @@ public class SegmentStatisticUpdater {
this.movingDuration = this.movingDuration.plus(movingDuration);
}
public boolean isIdle() {
return isIdle;
}
public void setIdle(boolean idle) {
isIdle = idle;
}
private Speed getAverageMovingSpeed() {
return Speed.of(totalDistance, movingDuration);
}