Umbau
This commit is contained in:
@@ -236,7 +236,7 @@ class MainActivity : ComponentActivity() {
|
||||
if (isNavigating()) {
|
||||
updateLocation(currentLocation, navigationViewModel)
|
||||
stepData.value = currentStep()
|
||||
if (route.currentManeuverIndex + 1 <= route.maneuvers.size) {
|
||||
if (route.currentStep + 1 <= legs.steps.size) {
|
||||
nextStepData.value = nextStep()
|
||||
}
|
||||
if (routeState.maneuverType == 39
|
||||
@@ -302,20 +302,21 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
fun simulate() = GlobalScope.async {
|
||||
for ((_, loc) in routeModel.route.waypoints.withIndex()) {
|
||||
if (routeModel.isNavigating()) {
|
||||
mock.setMockLocation(loc[1], loc[0])
|
||||
delay(500L) //
|
||||
for ((index, step) in routeModel.legs.steps.withIndex()) {
|
||||
for ((windex, waypoint) in step.maneuver.waypoints.withIndex()) {
|
||||
mock.setMockLocation(waypoint[1], waypoint[0])
|
||||
delay(1000L) //
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
for ((index, loc) in routeModel.route.waypoints.withIndex()) {
|
||||
if (index > 300) {
|
||||
routeModel.updateLocation(location(loc[0], loc[1]), navigationViewModel)
|
||||
for ((index, step) in routeModel.legs.steps.withIndex()) {
|
||||
println("${step.maneuver.waypoints.size}")
|
||||
for ((windex, waypoint) in step.maneuver.waypoints.withIndex()) {
|
||||
routeModel.updateLocation(location(waypoint[0], waypoint[1]), navigationViewModel)
|
||||
routeModel.currentStep()
|
||||
if (routeModel.route.currentManeuverIndex + 1 <= routeModel.route.maneuvers.size) {
|
||||
if (index + 1 <= routeModel.legs.steps.size) {
|
||||
nextStepData.value = routeModel.nextStep()
|
||||
}
|
||||
println(routeModel.routeState.maneuverType)
|
||||
|
||||
Reference in New Issue
Block a user