fix issue with back on route prompt
This commit is contained in:
parent
e6a0064586
commit
8460856d98
2 changed files with 10 additions and 9 deletions
|
@ -82,9 +82,6 @@ public class RoutingHelper {
|
|||
|
||||
private RouteCalculationProgressCallback progressRoute;
|
||||
|
||||
private boolean announceBackOnRoute = false;
|
||||
|
||||
|
||||
// private ProgressBar progress;
|
||||
// private Handler progressHandler;
|
||||
|
||||
|
@ -322,7 +319,6 @@ public class RoutingHelper {
|
|||
if(dist > 350) {
|
||||
if (isFollowingMode) {
|
||||
voiceRouter.announceOffRoute(dist);
|
||||
announceBackOnRoute = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -373,9 +369,8 @@ public class RoutingHelper {
|
|||
if(!thread.isParamsChanged()) {
|
||||
thread.stopCalculation();
|
||||
}
|
||||
if (announceBackOnRoute && isFollowingMode){
|
||||
if (isFollowingMode){
|
||||
voiceRouter.announceBackOnRoute();
|
||||
announceBackOnRoute = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public class VoiceRouter {
|
|||
private long waitAnnouncedSpeedLimit = 0;
|
||||
private long waitAnnouncedOffRoute = 0;
|
||||
private boolean suppressDest = false;
|
||||
private boolean announceBackOnRoute = false;
|
||||
|
||||
// private long lastTimeRouteRecalcAnnounced = 0;
|
||||
|
||||
|
@ -220,6 +221,7 @@ public class VoiceRouter {
|
|||
if (p != null) {
|
||||
notifyOnVoiceMessage();
|
||||
p.offRoute(dist).play();
|
||||
announceBackOnRoute = true;
|
||||
}
|
||||
if(waitAnnouncedOffRoute == 0) {
|
||||
waitAnnouncedOffRoute = 60000;
|
||||
|
@ -232,9 +234,12 @@ public class VoiceRouter {
|
|||
|
||||
public void announceBackOnRoute() {
|
||||
CommandBuilder p = getNewCommandPlayerToPlay();
|
||||
if (p != null) {
|
||||
notifyOnVoiceMessage();
|
||||
p.backOnRoute().play();
|
||||
if (announceBackOnRoute == true) {
|
||||
if (p != null) {
|
||||
notifyOnVoiceMessage();
|
||||
p.backOnRoute().play();
|
||||
}
|
||||
announceBackOnRoute = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,6 +431,7 @@ public class VoiceRouter {
|
|||
currentStatus = STATUS_UNKNOWN;
|
||||
suppressDest = false;
|
||||
playedAndArriveAtTarget = false;
|
||||
announceBackOnRoute = false;
|
||||
if (playGoAheadDist != -1) {
|
||||
playGoAheadDist = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue