drive_helpers.py: iterate button_timers with items() (#33351)

iterate button_timers with items()
This commit is contained in:
Dean Lee
2024-08-22 02:03:55 +08:00
committed by GitHub
parent 7af3c6dfee
commit 13e58d33db

View File

@@ -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