mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
Fixing bug preventing JSON to be parsed
This commit is contained in:
1 parent
8ff5aea866
commit
a7e3ba15a6
1 file changed
+2
-2
+2
-2
@@ -889,8 +889,8 @@ public class RegattasResource extends AbstractSailingServerResource {
|
||||
throw re;
|
||||
}
|
||||
}
|
||||
jsonCompetitorInLeg.put("gapToLeader-s",
|
||||
trackedLegOfCompetitor.getGapToLeader(timePoint, rankingInfo, WindPositionMode.LEG_MIDDLE));
|
||||
Duration gapToLeaderDuration = trackedLegOfCompetitor.getGapToLeader(timePoint, rankingInfo, WindPositionMode.LEG_MIDDLE);
|
||||
jsonCompetitorInLeg.put("gapToLeader-s", gapToLeaderDuration != null ? gapToLeaderDuration.asSeconds() : 0.0);
|
||||
jsonCompetitorInLeg.put("started", trackedLegOfCompetitor.hasStartedLeg(timePoint));
|
||||
jsonCompetitorInLeg.put("finished", trackedLegOfCompetitor.hasFinishedLeg(timePoint));
|
||||
jsonCompetitors.add(jsonCompetitorInLeg);
|
||||
|
||||
Reference in new issue
Block a user