mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 05:23:51 +00:00
Merge branch 'master' into bug3881
This commit is contained in:
commit
d622f1e350
5 files changed
+22
-4
No files matched your search
+2
-1
@@ -81,4 +81,5 @@ RankThirtySecondsAfterStart=Rank 30s After Start
|
|||||||
WindwardDistanceToAdvantageousEndOfLine=Windward Distance to Advantageous End of Line
|
WindwardDistanceToAdvantageousEndOfLine=Windward Distance to Advantageous End of Line
|
||||||
RankAfterHalfOfTheFirstLeg=Rank after the half of the first leg
|
RankAfterHalfOfTheFirstLeg=Rank after the half of the first leg
|
||||||
AdvantageousEndOfLine=Advantageous End of Line
|
AdvantageousEndOfLine=Advantageous End of Line
|
||||||
TimeSpentInSeconds=Time Spent in Seconds
|
TimeSpentInSeconds=Time Spent in Seconds
|
||||||
|
MedalRace=Medal Race
|
||||||
+2
-1
@@ -81,4 +81,5 @@ RankThirtySecondsAfterStart=Absolute Platzierung 30s nach dem Startzeitpunkt
|
|||||||
WindwardDistanceToAdvantageousEndOfLine=Windwärtige Distanz zum Bevorteilten Ende der Startlinie
|
WindwardDistanceToAdvantageousEndOfLine=Windwärtige Distanz zum Bevorteilten Ende der Startlinie
|
||||||
RankAfterHalfOfTheFirstLeg=Platzierung nach der Hälfte des ersten Schenkels
|
RankAfterHalfOfTheFirstLeg=Platzierung nach der Hälfte des ersten Schenkels
|
||||||
AdvantageousEndOfLine=Bevorteiltes Ende der Startlinie
|
AdvantageousEndOfLine=Bevorteiltes Ende der Startlinie
|
||||||
TimeSpentInSeconds=Benötigte Zeit in Sekunden
|
TimeSpentInSeconds=Benötigte Zeit in Sekunden
|
||||||
|
MedalRace=Medaillenrennen
|
||||||
+3
@@ -40,6 +40,9 @@ public interface HasTrackedRaceContext {
|
|||||||
@Dimension(messageKey="AdvantageousEndOfLine", ordinal=6)
|
@Dimension(messageKey="AdvantageousEndOfLine", ordinal=6)
|
||||||
public NauticalSide getAdvantageousEndOfLine();
|
public NauticalSide getAdvantageousEndOfLine();
|
||||||
|
|
||||||
|
@Dimension(messageKey="MedalRace", ordinal=7)
|
||||||
|
public Boolean isMedalRace();
|
||||||
|
|
||||||
@Dimension(messageKey="IsTracked", ordinal=7)
|
@Dimension(messageKey="IsTracked", ordinal=7)
|
||||||
public Boolean isTracked();
|
public Boolean isTracked();
|
||||||
|
|
||||||
|
|||||||
+5
@@ -98,6 +98,11 @@ public class TrackedRaceWithContext implements HasTrackedRaceContext {
|
|||||||
LineDetails startLine = getTrackedRace().getStartLine(getTrackedRace().getStartOfRace());
|
LineDetails startLine = getTrackedRace().getStartLine(getTrackedRace().getStartOfRace());
|
||||||
return startLine.getAdvantageousSideWhileApproachingLine();
|
return startLine.getAdvantageousSideWhileApproachingLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean isMedalRace() {
|
||||||
|
return getLeaderboardContext().getLeaderboard().getRaceColumnAndFleet(getTrackedRace()).getA().isMedalRace();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean isTracked() {
|
public Boolean isTracked() {
|
||||||
|
|||||||
+10
-2
@@ -235,7 +235,7 @@ public class RaceTimePanel extends TimePanel<RaceTimePanelSettings> implements R
|
|||||||
// neither do we know about the end time if both, startOfTracking and endOfTracking are null
|
// neither do we know about the end time if both, startOfTracking and endOfTracking are null
|
||||||
// and we have neither a valid newestTrackingEvent nor an endOfRace value; if we do, we would
|
// and we have neither a valid newestTrackingEvent nor an endOfRace value; if we do, we would
|
||||||
// have to be before the later one plus some leeway.
|
// have to be before the later one plus some leeway.
|
||||||
final Date endTimeOfLivePeriod;
|
Date endTimeOfLivePeriod;
|
||||||
if (lastRaceTimesInfo.startOfTracking == null && lastRaceTimesInfo.endOfTracking == null) {
|
if (lastRaceTimesInfo.startOfTracking == null && lastRaceTimesInfo.endOfTracking == null) {
|
||||||
Date latestOfNewestTrackingEventAndEndOfRace = lastRaceTimesInfo.newestTrackingEvent;
|
Date latestOfNewestTrackingEventAndEndOfRace = lastRaceTimesInfo.newestTrackingEvent;
|
||||||
if (latestOfNewestTrackingEventAndEndOfRace == null || (lastRaceTimesInfo.endOfRace != null && lastRaceTimesInfo.endOfRace.after(latestOfNewestTrackingEventAndEndOfRace))) {
|
if (latestOfNewestTrackingEventAndEndOfRace == null || (lastRaceTimesInfo.endOfRace != null && lastRaceTimesInfo.endOfRace.after(latestOfNewestTrackingEventAndEndOfRace))) {
|
||||||
@@ -244,7 +244,15 @@ public class RaceTimePanel extends TimePanel<RaceTimePanelSettings> implements R
|
|||||||
endTimeOfLivePeriod = latestOfNewestTrackingEventAndEndOfRace == null ? null :
|
endTimeOfLivePeriod = latestOfNewestTrackingEventAndEndOfRace == null ? null :
|
||||||
new Date(latestOfNewestTrackingEventAndEndOfRace.getTime() + RaceTimesCalculationUtil.TIME_AFTER_LIVE);
|
new Date(latestOfNewestTrackingEventAndEndOfRace.getTime() + RaceTimesCalculationUtil.TIME_AFTER_LIVE);
|
||||||
} else {
|
} else {
|
||||||
endTimeOfLivePeriod = lastRaceTimesInfo.endOfTracking == null ? null : lastRaceTimesInfo.endOfTracking;
|
endTimeOfLivePeriod = lastRaceTimesInfo.endOfTracking == null ? null : lastRaceTimesInfo.endOfTracking;
|
||||||
|
if (lastRaceTimesInfo.endOfRace != null) {
|
||||||
|
// this is a failsafe, if the tracking was never finsihed, the race was always assumed to be live.
|
||||||
|
Date latestAllowedTime = new Date(
|
||||||
|
lastRaceTimesInfo.endOfRace.getTime() + RaceTimesCalculationUtil.MAX_TIME_AFTER_RACE_END);
|
||||||
|
if (endTimeOfLivePeriod == null || endTimeOfLivePeriod.after(latestAllowedTime)) {
|
||||||
|
endTimeOfLivePeriod = latestAllowedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
isLiveModeToBeMadePossible = endTimeOfLivePeriod == null /* meaning we don't know an end time */ ||
|
isLiveModeToBeMadePossible = endTimeOfLivePeriod == null /* meaning we don't know an end time */ ||
|
||||||
endTimeOfLivePeriod.getTime() >= liveTimePointInMillis;
|
endTimeOfLivePeriod.getTime() >= liveTimePointInMillis;
|
||||||
|
|||||||
Reference in new issue
Block a user