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

iterate button_timers with items()
old-commit-hash: 13e58d33dbe3a7c64f9ff3201fec0c99b477d37e
This commit is contained in:
Dean Lee
2024-08-22 02:03:55 +08:00
committed by GitHub
parent 093fac6f5a
commit 2871822bd2
+2 -2
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