Skip to content

Commit f4445df

Browse files
authored
Merge pull request #143 from 12urenloop/standing_position
only send the standing still position once every interval
2 parents 413e855 + b5cb3d5 commit f4445df

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/telraam/logic/positioner/nostradamus/Nostradamus.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ private void calculatePosition() {
131131
entry.getValue().getPosition().getProgress()
132132
))
133133
);
134+
entry.getValue().setPreviousStationArrival(entry.getValue().getPreviousStationArrival() + MAX_NO_DATA_MS);
134135
}
135136
}
136137

src/main/java/telraam/logic/positioner/nostradamus/TeamData.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package telraam.logic.positioner.nostradamus;
22

33
import lombok.Getter;
4+
import lombok.Setter;
45
import telraam.database.models.Detection;
56
import telraam.database.models.Station;
67
import telraam.logic.positioner.Position;
@@ -13,7 +14,7 @@ public class TeamData {
1314
private final Map<Integer, StationData> stations; // Station list
1415
private StationData currentStation; // Current station location
1516
private StationData previousStation; // Previous station location
16-
@Getter
17+
@Getter @Setter
1718
private long previousStationArrival; // Arrival time of previous station. Used to calculate the average times
1819
private final int totalDistance; // Total distance of the track
1920
private final float maxDeviance; // Maximum deviance the animation can have from the reality

0 commit comments

Comments
 (0)