feat: Speed mapping
This commit is contained in:
parent
85e4fdb858
commit
30dc5c623e
1 changed files with 6 additions and 4 deletions
|
@ -103,10 +103,12 @@ class MapboxMapper {
|
|||
return Lanes(Arrows(lanes), Arrows(outlines))
|
||||
}
|
||||
|
||||
fun map(locationMatcherResult: LocationMatcherResult): GarminLocation {
|
||||
val state = GarminLocation()
|
||||
// TODO: speed, limit, location?, bearing
|
||||
return state
|
||||
fun asSpeed(locationMatcherResult: LocationMatcherResult): Speed {
|
||||
return Speed(
|
||||
locationMatcherResult.enhancedLocation.speed.let { it?.toInt() ?: 0 },
|
||||
locationMatcherResult.speedLimitInfo.speed.let { it ?: 0 },
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue