Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-08-11 20:52:52 +02:00
commit 3e8d2d1d20

View file

@ -569,8 +569,8 @@ public class RouteCalculationResult {
if(Math.abs(diff) > 10) {
type = diff > 0 ? TurnType.KL : TurnType.KR;
}
// AvgSpeed = 999999 for the last turn prevents the turn to have noticeable impact on travel time totalling if calculated route ends on a GPX route segment
RouteDirectionInfo info = new RouteDirectionInfo(999999, TurnType.valueOf(type, false));
// Wrong AvgSpeed for the last turn can cause significantly wrong total travel time if calculated route ends on a GPX route segment (then last turn is where GPX is joined again)
RouteDirectionInfo info = new RouteDirectionInfo(lastDirInf != null ? lastDirInf.getAverageSpeed() : 1, TurnType.valueOf(type, false));
info.distance = 0;
info.afterLeftTime = 0;
info.routePointOffset = locations.size() - 1;