Recent Places Sort by navigations, DEVIATION Maximum

This commit is contained in:
Dimitris
2026-05-30 10:22:27 +02:00
parent 21d9688b99
commit df1ceb5c44
7 changed files with 20 additions and 25 deletions
@@ -479,7 +479,7 @@ class NavigationSession : CarSession(), NavigationListener, NavigationObserverCa
checkArrival()
}
val end = System.currentTimeMillis()
Log.d(TAG, "UpdateLocation ${end-start} ms")
//Log.d(TAG, "UpdateLocation ${end-start} ms")
}
/**
@@ -492,8 +492,7 @@ class NavigationSession : CarSession(), NavigationListener, NavigationObserverCa
): Boolean {
val distance = location.distanceTo(snappedLocation)
when {
distance > MAXIMAL_ROUTE_DEVIATION -> {
Log.d(TAG, "Recalculate $distance ")
distance > MAXIMAL_ROUTE_DEVIATION && distance < MAXIMAL_ROUTE_DEVIATION * 10-> {
stopNavigation()
navigationScreen.calculateNewRoute(routeModel.navState.destination)
return false
@@ -549,7 +548,6 @@ class NavigationSession : CarSession(), NavigationListener, NavigationObserverCa
* Checks for arrival
*/
fun checkArrival() {
Log.d(TAG, "maneuverType ${routeModel.navState.maneuverType} Distance ${routeModel.routeCalculator.leftStepDistance()}")
if (routeModel.isManeuverArrival()
&& routeModel.routeCalculator.leftStepDistance() < DESTINATION_ARRIVAL_DISTANCE
) {
@@ -189,7 +189,7 @@ open class NavigationScreen(
.setActionStrip(actionStripBuilder.build())
.setMapActionStrip(mapActionStrip)
.setPanModeListener { isInPanMode: Boolean ->
Log.d(TAG, "PanMode $isInPanMode")
}
.build()
}
@@ -126,21 +126,10 @@ class PlaceListScreen(
* Creates an Action to navigate to a specific place.
*/
private fun clickOnPlace(itPlace: Place) {
place = Place(
0,
itPlace.name,
itPlace.category,
itPlace.latitude,
itPlace.longitude,
itPlace.postalCode,
itPlace.city,
itPlace.street,
// avatar = null
)
if (surfaceRenderer.navigation) {
startStopOverScreen(place)
startStopOverScreen(itPlace)
} else {
starPreviewScreen(place)
starPreviewScreen(itPlace)
}
}