Showing wind from racelog if none is available from tracked race

This commit is contained in:
Steffen Schaefer committed 2015-07-14 11:05:16 +02:00
1 parent 6103f0030c
commit 89bcc7d343
1 file changed
+8 -10
@@ -144,11 +144,10 @@ public class RaceContext {
}
}
}
} else {
Wind wind = checkForWindFixesFromRaceLog();
if (wind != null) {
return new SimpleWindDTO(wind.getFrom().getDegrees(), wind.getKnots());
}
}
Wind wind = checkForWindFixesFromRaceLog();
if (wind != null) {
return new SimpleWindDTO(wind.getFrom().getDegrees(), wind.getKnots());
}
return null;
}
@@ -194,11 +193,10 @@ public class RaceContext {
return new WindStatisticsDTO(averageDirection, lowerBoundWindInKnots, upperBoundWindInKnots);
}
}
} else {
Wind wind = checkForWindFixesFromRaceLog();
if (wind != null) {
return new WindStatisticsDTO(wind.getFrom().getDegrees(), wind.getKnots(), wind.getKnots());
}
}
Wind wind = checkForWindFixesFromRaceLog();
if (wind != null) {
return new WindStatisticsDTO(wind.getFrom().getDegrees(), wind.getKnots(), wind.getKnots());
}
return null;
}