This commit is contained in:
Dimitris
2025-11-17 10:11:15 +01:00
parent 1773ec2244
commit 3f3bdeb96d
12 changed files with 153 additions and 88 deletions

View File

@@ -48,7 +48,6 @@ import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.livedata.observeAsState
import androidx.compose.runtime.mutableStateOf
@@ -152,7 +151,7 @@ class MainActivity : ComponentActivity() {
val curLocation = Location(LocationManager.GPS_PROVIDER)
curLocation.longitude = loc[0]
curLocation.latitude = loc[1]
routeModel.findManeuver(curLocation)
routeModel.updateLocation(curLocation)
val leftTime = routeModel.travelLeftTime()
val leftDistance = routeModel.travelLeftDistance()
Log.i(TAG, " leftTime: ${leftTime / 60}")