Unified with python var names

This commit is contained in:
Piotr Dec 2023-08-21 16:57:48 +02:00
parent 385234bfd9
commit 379dd7118a
No known key found for this signature in database
GPG key ID: ABD6CB83D6110D27
3 changed files with 22 additions and 28 deletions

View file

@ -10,17 +10,10 @@ class ManeuverMapper {
val state = State()
maneuver.apply {
this.primary.apply {
state.direction = Direction()
when (this.type) {
"turn" -> {
state.direction.outType = OutType.Lane
state.direction.roundabout = OutAngle.AsDirection
}
"roundabout" -> {
state.direction.outType = OutType.RightRoundabout
state.direction.out = OutType.RightRoundabout
}
"arrive" -> {
state.flag = true
}
@ -28,17 +21,17 @@ class ManeuverMapper {
when (this.modifier) {
"right" -> {
when (this.type) {
"turn" -> state.direction.outAngle = OutAngle.Right
"turn" -> state.direction.angle = OutAngle.Right
"roundabout" -> {
when (this.degrees) {
137.0 -> state.direction.outAngle = OutAngle.EasyRight
137.0 -> state.direction.angle = OutAngle.EasyRight
}
}
}
}
"left" -> {
when (this.type) {
"turn" -> state.direction.outAngle = OutAngle.Left
"turn" -> state.direction.angle = OutAngle.Left
}
}
}