hexagram/py/hexagram/trans.py
2024-01-04 11:14:06 -05:00

37 lines
741 B
Python

import enum
class Gear(enum.Enum):
R = -1
N = 0
GEAR_1 = 1
GEAR_2 = 2
GEAR_3 = 3
GEAR_4 = 4
GEAR_5 = 5
GEAR_6 = 6
GEAR_7 = 7
GEAR_8 = 8
GEAR_9 = 9
GEAR_10 = 10
__strings__ = {
-1: 'R', 0: 'N', 1: '1', 2: '2', 3: '3', 4: '4',
5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10'
}
def __str__(self):
return self.__strings__.get(self.value, '?')
class ShiftMode(enum.Enum):
NORMAL = 0
COMFORT = 1
ECO = 2
SPORT = 3
RACE = 4
__strings__ = {
0: 'Normal', 1: 'Comfort', 2: 'Eco', 3: 'Sport', 4: 'Race'
}
def __str__(self):
return self.__strings__.get(self.value, '?')