Add 'M' prefix for indicating manual shift mode
This commit is contained in:
parent
0dbb119bc6
commit
5f74d6de02
2 changed files with 7 additions and 4 deletions
|
@ -60,9 +60,11 @@ class Tacho(Dial):
|
|||
def gear_text(self):
|
||||
text = ''
|
||||
|
||||
if self.shift_mode.value >= ShiftMode.SPORT.value \
|
||||
and self.gear.value >= Gear.GEAR_1.value:
|
||||
text += 'S'
|
||||
if self.gear.value >= Gear.GEAR_1.value:
|
||||
if self.shift_mode is ShiftMode.SPORT or self.shift_mode is ShiftMode.RACE:
|
||||
text += 'S'
|
||||
elif self.shift_mode is ShiftMode.MANUAL:
|
||||
text += 'M'
|
||||
|
||||
text += str(self.gear)
|
||||
|
||||
|
|
|
@ -28,9 +28,10 @@ class ShiftMode(enum.Enum):
|
|||
ECO = 2
|
||||
SPORT = 3
|
||||
RACE = 4
|
||||
MANUAL = 5
|
||||
|
||||
__strings__ = {
|
||||
0: 'Normal', 1: 'Comfort', 2: 'Eco', 3: 'Sport', 4: 'Race'
|
||||
0: 'Normal', 1: 'Comfort', 2: 'Eco', 3: 'Sport', 4: 'Race', 5: 'Manual'
|
||||
}
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue