Update the remaining length of the tunnel
This commit is contained in:
parent
5912e71e51
commit
f63a800e1f
1 changed files with 8 additions and 2 deletions
|
@ -184,10 +184,16 @@ public class WaypointHelper {
|
|||
List<LocationPointWrapper> lp = locationPoints.get(ALARMS);
|
||||
while (kIterator < lp.size()) {
|
||||
AlarmInfo inf = (AlarmInfo) lp.get(kIterator).point;
|
||||
if (inf.getLocationIndex() < route.getCurrentRoute() && inf.getLastLocationIndex() != -1
|
||||
&& inf.getLastLocationIndex() < route.getCurrentRoute()) {
|
||||
int currentRoute = route.getCurrentRoute();
|
||||
if (inf.getLocationIndex() < currentRoute && inf.getLastLocationIndex() != -1
|
||||
&& inf.getLastLocationIndex() < currentRoute) {
|
||||
// skip
|
||||
} else {
|
||||
if (inf.getType() == AlarmInfoType.TUNNEL && inf.getLastLocationIndex() != -1
|
||||
&& currentRoute > inf.getLocationIndex()
|
||||
&& currentRoute < inf.getLastLocationIndex()) {
|
||||
inf.setFloatValue(route.getDistanceToPoint(inf.getLastLocationIndex()));
|
||||
}
|
||||
int d = route.getDistanceToPoint(inf.getLocationIndex());
|
||||
if (d > LONG_ANNOUNCE_RADIUS) {
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue