fix: Minor fixes
- speed unit - screen cleared
This commit is contained in:
parent
9758da2a10
commit
01f75a466f
2 changed files with 2 additions and 1 deletions
|
@ -202,6 +202,7 @@ class Garmin(
|
|||
sleep(3000)
|
||||
readAll()
|
||||
send(intArrayOf(0x07, 0x01)) // Set GPS to true
|
||||
send(intArrayOf(0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)) // Clear screen
|
||||
while (true) {
|
||||
val newCurrent = queue.poll()
|
||||
if (newCurrent == null) {
|
||||
|
|
|
@ -106,7 +106,7 @@ class MapboxMapper {
|
|||
|
||||
fun asSpeed(locationMatcherResult: LocationMatcherResult): Speed {
|
||||
return Speed(
|
||||
locationMatcherResult.enhancedLocation.speed.let { it?.toInt() ?: 0 },
|
||||
locationMatcherResult.enhancedLocation.speed.let { it?.let { it / 1000.0 * 3600 }?.toInt() ?: 0 },
|
||||
locationMatcherResult.speedLimitInfo.speed.let { it ?: 0 },
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue