introduce better reset for when route should be recalculated to save some internet traffic
This commit is contained in:
parent
5638b379be
commit
5f859054c6
1 changed files with 6 additions and 1 deletions
|
@ -418,6 +418,10 @@ public class RoutingHelper {
|
||||||
if(isFollowingMode){
|
if(isFollowingMode){
|
||||||
tryMarkPassedRoute(start);
|
tryMarkPassedRoute(start);
|
||||||
directionDetection(start);
|
directionDetection(start);
|
||||||
|
// reset evalWaitInterval only if new route is in forward direction
|
||||||
|
if(!suppressTurnPrompt){
|
||||||
|
evalWaitInterval = 3001;
|
||||||
|
}
|
||||||
voiceRouter.newRouteIsCalculated(updateRoute, suppressTurnPrompt);
|
voiceRouter.newRouteIsCalculated(updateRoute, suppressTurnPrompt);
|
||||||
}
|
}
|
||||||
currentRoute = 0;
|
currentRoute = 0;
|
||||||
|
@ -569,7 +573,8 @@ public class RoutingHelper {
|
||||||
if (res.isCalculated()) {
|
if (res.isCalculated()) {
|
||||||
setNewRoute(res, start);
|
setNewRoute(res, start);
|
||||||
// reset error wait interval
|
// reset error wait interval
|
||||||
evalWaitInterval = 3001;
|
// reset evalWaitInterval in setNewRoute and only if new route is in forward direction
|
||||||
|
// evalWaitInterval = 3001;
|
||||||
} else {
|
} else {
|
||||||
evalWaitInterval = evalWaitInterval * 4 / 3;
|
evalWaitInterval = evalWaitInterval * 4 / 3;
|
||||||
if (evalWaitInterval > 120000) {
|
if (evalWaitInterval > 120000) {
|
||||||
|
|
Loading…
Reference in a new issue