fix orphaned turnIn statement after straight segments

This commit is contained in:
sonora 2016-05-22 10:05:04 +02:00
parent 8a43f27110
commit acdc0b1655

View file

@ -719,16 +719,29 @@ public class VoiceRouter {
if ((nextNextInfo != null) && (nextNextInfo.directionInfo != null)) {
String t2Param = getTurnType(nextNextInfo.directionInfo.getTurnType());
if (t2Param != null) {
if(isplay) { play.then(); }
play.turn(t2Param, nextNextInfo.distanceTo, empty);
if(isplay) {
play.then();
play.turn(t2Param, nextNextInfo.distanceTo, empty);
}
} else if (nextNextInfo.directionInfo.getTurnType().isRoundAbout()) {
if(isplay) { play.then(); }
play.roundAbout(nextNextInfo.distanceTo, nextNextInfo.directionInfo.getTurnType().getTurnAngle(), nextNextInfo.directionInfo.getTurnType().getExitOut(), empty);
if(isplay) {
play.then();
play.roundAbout(nextNextInfo.distanceTo, nextNextInfo.directionInfo.getTurnType().getTurnAngle(), nextNextInfo.directionInfo.getTurnType().getExitOut(), empty);
}
} else if (nextNextInfo.directionInfo.getTurnType().getValue() == TurnType.TU) {
if(isplay) { play.then(); }
play.makeUT(nextNextInfo.distanceTo, empty);
if(isplay) {
play.then();
play.makeUT(nextNextInfo.distanceTo, empty);
}
}
// This case only needed should we want another prompt at the end of straight segments (equivalent of makeTurn) and nextNextInfo should be announced again there.
if (nextNextInfo.directionInfo.getTurnType().getValue() != TurnType.C && next.getTurnType().getValue() == TurnType.C) {
play.goAhead();
play.then();
play.turn(t2Param, nextNextInfo.distanceTo, empty);
isplay = true;
}
isplay = true;
}
if(isplay){
notifyOnVoiceMessage();