Fix bug with distance threshold for point announcements

This commit is contained in:
sonora 2014-09-10 16:25:22 +02:00
parent 0e798fb169
commit c0aaabdd8e

View file

@ -306,8 +306,8 @@ public class WaypointHelper {
break; break;
} }
LocationPoint point = lwp.point; LocationPoint point = lwp.point;
double d1 = MapUtils.getDistance(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(), double d1 = Math.max(0.0, MapUtils.getDistance(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(),
point.getLatitude(), point.getLongitude()) + lwp.getDeviationDistance(); point.getLatitude(), point.getLongitude()) - lwp.getDeviationDistance());
Integer state = locationPointsStates.get(point); Integer state = locationPointsStates.get(point);
if (state != null && state.intValue() == ANNOUNCED_ONCE if (state != null && state.intValue() == ANNOUNCED_ONCE
&& getVoiceRouter() && getVoiceRouter()