formatting

Change-Id: Icc29c3a2786e00fd0964af95dffcd820b78cc79a
This commit is contained in:
Axel Uhl committed 2018-10-08 14:21:49 +02:00
1 parent c7564f5014
commit a98e2ef8ba
2 files changed
+5 -7

No files matched your search

@@ -132,10 +132,10 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
/**
* This map contains the last maneuver for each deviceId that was sent back. It is used to efficiently piggyback a
* notification about new possible maneuvers into the response to adding a gpsfix for smartphone tracking. This
* notification about new possible maneuvers into the response to adding a GPS fix for smart phone tracking. This
* allows the client to not require any additional polling for maneuver retrieval. The map is never cleared, as it
* will not take a lot of memory itself, and will not grow further after each smartphone device pushed at least one
* gpsfix
* will not take a lot of memory itself, and will not grow further after each smart phone device pushed at least one
* GPS fix.
*/
private final ConcurrentHashMap<UUID, Maneuver> lastNotifiedManeuverCache = new ConcurrentHashMap<>();
@@ -702,13 +702,11 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
@Override
public List<Maneuver> computeCacheUpdate(Competitor competitor, EmptyUpdateInterval updateInterval)
throws NoWindException {
Duration averageIntervalBetweenRawFixes = getTrack(competitor)
.getAverageIntervalBetweenRawFixes();
Duration averageIntervalBetweenRawFixes = getTrack(competitor).getAverageIntervalBetweenRawFixes();
if (averageIntervalBetweenRawFixes != null) {
ManeuverDetector maneuverDetector;
if (averageIntervalBetweenRawFixes.asSeconds() >= 30) {
maneuverDetector = new LowGPSSamplingRateManeuverDetectorImpl(TrackedRaceImpl.this,
competitor);
maneuverDetector = new LowGPSSamplingRateManeuverDetectorImpl(TrackedRaceImpl.this, competitor);
} else {
maneuverDetector = maneuverDetectorPerCompetitorCache.getValue(competitor);
}