Skip to content

Commit 54c7ae6

Browse files
authored
Hazard Lights Flashing Error when One of the Turn Signals is On (#467)
* Bug fixed: incorrect hazard light animation logic. (#466) * Bug fixed: incorrect hazard light animation logic. (#466)
1 parent be17996 commit 54c7ae6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

leads/context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def hazard(self, hazard: bool | None = None) -> bool | None:
116116
"""
117117
if hazard is None:
118118
return self._hazard
119+
self.left_indicator(False, True)
120+
self.right_indicator(False, True)
119121
self.left_indicator(hazard, True)
120122
self.right_indicator(hazard, True)
121123
self._hazard = hazard

leads_vec/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ def right_indicator(self, e: Event, state: bool) -> None:
421421

422422
@_override
423423
def hazard(self, e: Event, state: bool) -> None:
424-
super().hazard(e, state)
425424
uim["hazard"].configure(image=Hazard(color=Color.RED if state else None))
426425

427426
ctx.set_event_listener(CustomListener())

0 commit comments

Comments
 (0)