fix: Round commas in manouvers
This commit is contained in:
parent
406831ad20
commit
bb9a497a73
1 changed files with 6 additions and 2 deletions
|
@ -36,6 +36,7 @@ class ManeuverMapper {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
"left" -> {
|
||||
when (this.type) {
|
||||
"turn" -> state.direction.outAngle = OutAngle.Left
|
||||
|
@ -46,11 +47,14 @@ class ManeuverMapper {
|
|||
this.stepDistance.apply {
|
||||
this.distanceRemaining?.apply {
|
||||
distanceFormatter.formatDistance(distanceRemaining!!).split(" ").apply {
|
||||
state.distance = this[0].toInt()
|
||||
// TODO: Send double
|
||||
state.distance = this[0].replace(',', '.').toDouble().toInt()
|
||||
state.unit = when (this[1]) {
|
||||
"m" -> Unit.Metres
|
||||
"km" -> Unit.Kilometres
|
||||
else -> {Unit.Any}
|
||||
else -> {
|
||||
Unit.Any
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue