Only show S-Bahn position for S-Bahn
This commit is contained in:
parent
187e7ad16a
commit
a3b17da81d
4
run.py
4
run.py
|
@ -97,11 +97,13 @@ def update_display(display, dbi):
|
|||
elif delay > 60:
|
||||
delay_text = UNSPECIFIC_DELAY_TEXT
|
||||
display.info_2.set(delay_text)
|
||||
else:
|
||||
elif train_type == "S":
|
||||
# Random train length indicator for S-Bahn
|
||||
random.seed(train['train'])
|
||||
train_length_pos = random.randint(36, 45)
|
||||
display.info_2.set(MAP_INFO_2[train_length_pos])
|
||||
else:
|
||||
display.info_2.set("")
|
||||
|
||||
train_type_text = TRAIN_TYPE_MAP.get(train_type, "")
|
||||
display.info_1.set(train_type_text)
|
||||
|
|
Loading…
Reference in New Issue