mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-05 19:13:07 +02:00
Move isIdle to TrackStatisticsUpdater.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user