mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 02:52:04 +08:00
drive_helpers.py: iterate button_timers with items() (#33351)
iterate button_timers with items() old-commit-hash: 13e58d33dbe3a7c64f9ff3201fec0c99b477d37e
This commit is contained in:
@@ -86,8 +86,8 @@ class VCruiseHelper:
|
||||
button_type = b.type.raw
|
||||
break
|
||||
else:
|
||||
for k in self.button_timers.keys():
|
||||
if self.button_timers[k] and self.button_timers[k] % CRUISE_LONG_PRESS == 0:
|
||||
for k, timer in self.button_timers.items():
|
||||
if timer and timer % CRUISE_LONG_PRESS == 0:
|
||||
button_type = k
|
||||
long_press = True
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user