Swap secondary and primary turns if the secondary turn is actually the turn being made.

This commit is contained in:
Saikrishna Arcot 2014-10-06 14:10:57 -04:00
parent 3ef0a4f9a8
commit 88156c0370

View file

@ -661,7 +661,13 @@ public class RouteResultPreparation {
if (TurnType.getPrimaryTurn(t.getLanes()[i]) == 0) {
t.setPrimaryTurn(i, turn);
} else {
t.setSecondaryTurn(i, turn);
if (turn == t.getValue()) {
t.setSecondaryTurn(i, TurnType.getPrimaryTurn(t.getLanes()[i]));
t.setPrimaryTurn(i, turn);
} else {
t.setSecondaryTurn(i, turn);
}
break; // Move on to the next lane
}
}