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))
|
return Lanes(Arrows(lanes), Arrows(outlines))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun map(locationMatcherResult: LocationMatcherResult): GarminLocation {
|
fun asSpeed(locationMatcherResult: LocationMatcherResult): Speed {
|
||||||
val state = GarminLocation()
|
return Speed(
|
||||||
// TODO: speed, limit, location?, bearing
|
locationMatcherResult.enhancedLocation.speed.let { it?.toInt() ?: 0 },
|
||||||
return state
|
locationMatcherResult.speedLimitInfo.speed.let { it ?: 0 },
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue