Unified with python var names
This commit is contained in:
parent
385234bfd9
commit
379dd7118a
3 changed files with 22 additions and 28 deletions
|
@ -1,6 +1,6 @@
|
|||
package eu.ztsh.garmin
|
||||
|
||||
enum class OutType(val data: Int) {
|
||||
enum class OutType(val value: Int) {
|
||||
|
||||
Off(0x00),
|
||||
Lane(0x01),
|
||||
|
@ -13,7 +13,7 @@ enum class OutType(val data: Int) {
|
|||
}
|
||||
|
||||
|
||||
enum class OutAngle(val data: Int) {
|
||||
enum class OutAngle(val value: Int) {
|
||||
|
||||
Down(0x01),
|
||||
SharpRight(0x02),
|
||||
|
@ -29,7 +29,7 @@ enum class OutAngle(val data: Int) {
|
|||
|
||||
}
|
||||
|
||||
enum class Unit(val data: Int) {
|
||||
enum class Unit(val value: Int) {
|
||||
|
||||
Any(0),
|
||||
Metres(1),
|
||||
|
@ -39,7 +39,7 @@ enum class Unit(val data: Int) {
|
|||
|
||||
}
|
||||
|
||||
enum class Lane(val data: Int) {
|
||||
enum class Lane(val value: Int) {
|
||||
|
||||
DotsRight(0x01),
|
||||
OuterRight(0x02),
|
||||
|
@ -70,8 +70,8 @@ class State {
|
|||
}
|
||||
|
||||
class Direction {
|
||||
var outAngle: OutAngle = OutAngle.AsDirection
|
||||
var outType: OutType = OutType.Lane
|
||||
var angle: OutAngle = OutAngle.AsDirection
|
||||
var out: OutType = OutType.Lane
|
||||
var roundabout: OutAngle = OutAngle.AsDirection
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
|
@ -79,16 +79,16 @@ class Direction {
|
|||
|
||||
other as Direction
|
||||
|
||||
if (outAngle != other.outAngle) return false
|
||||
if (outType != other.outType) return false
|
||||
if (angle != other.angle) return false
|
||||
if (out != other.out) return false
|
||||
if (roundabout != other.roundabout) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result = outAngle.hashCode()
|
||||
result = 31 * result + outType.hashCode()
|
||||
var result = angle.hashCode()
|
||||
result = 31 * result + out.hashCode()
|
||||
result = 31 * result + roundabout.hashCode()
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue