feat: Lane assist
This commit is contained in:
parent
f5ec500343
commit
386bb50621
3 changed files with 33 additions and 12 deletions
|
@ -47,11 +47,15 @@ enum class Lane(val value: Int) {
|
|||
InnerLeft(0x10),
|
||||
MiddleLeft(0x20),
|
||||
OuterLeft(0x40),
|
||||
DotsLeft(0x80)
|
||||
DotsLeft(0x80);
|
||||
|
||||
companion object {
|
||||
val iterator = {sortedSetOf(OuterRight, MiddleRight, InnerRight, InnerLeft, MiddleLeft, OuterLeft).iterator()}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Arrows(val lanes: List<Lane>) {
|
||||
class Arrows(val lanes: Set<Lane>) {
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
|
@ -151,7 +155,7 @@ class GarminManeuver : GarminModelItem {
|
|||
|
||||
val empty: () -> GarminManeuver = {
|
||||
val manouver = GarminManeuver()
|
||||
manouver.lanes = Lanes(Arrows(listOf()), Arrows(listOf()))
|
||||
manouver.lanes = Lanes(Arrows(setOf()), Arrows(setOf()))
|
||||
manouver.direction = Direction(out = OutType.Off)
|
||||
manouver.distance = Distance(0.0, Unit.Any)
|
||||
manouver
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue