For Issue #1411, test playing goAhead in fewer cases only

This commit is contained in:
sonora 2015-09-05 10:56:01 +02:00
parent 4c6c6a5d51
commit ab67acad86

View file

@ -416,7 +416,7 @@ public class VoiceRouter {
nextRouteDirection = next; nextRouteDirection = next;
currentStatus = STATUS_UNKNOWN; currentStatus = STATUS_UNKNOWN;
playedAndArriveAtTarget = false; playedAndArriveAtTarget = false;
playGoAheadDist = 0; playGoAheadDist = -1;
} }
if (!repeat) { if (!repeat) {
@ -432,9 +432,10 @@ public class VoiceRouter {
} }
} }
// TODO: Tell goAhead distance after route calculation if no other prompt is due, or after a turn if next turn is more than PREPARE_LONG_DISTANCE away
if (currentStatus == STATUS_UNKNOWN) { if (currentStatus == STATUS_UNKNOWN) {
if (!isDistanceLess(speed, dist, TURN_IN_DISTANCE * 1.3, 0f)) { // Tell goAhead distance after (1) route calculation if no other prompt is due, or (2) after a turn if next turn is more than PREPARE_LONG_DISTANCE away
//if (!isDistanceLess(speed, dist, TURN_IN_DISTANCE * 1.3, 0f)) {
if (playGoAheadDist = -1 || !isDistanceLess(speed, dist, PREPARE_LONG_DISTANCE + 300, 0f)) {
playGoAheadDist = dist - 80; playGoAheadDist = dist - 80;
} }
// Put voice router in appropriate status // Put voice router in appropriate status