feat: Speed mapping

This commit is contained in:
Piotr Dec 2024-08-02 01:53:32 +02:00
parent 85e4fdb858
commit 30dc5c623e
Signed by: stawros
GPG key ID: F89F27AD8F881A91

View file

@ -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 },
)
} }
} }