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

iterate button_timers with items()
old-commit-hash: 13e58d33db
pull/33386/head
Dean Lee 8 months ago committed by GitHub
parent 093fac6f5a
commit 2871822bd2
  1. 4
      selfdrive/controls/lib/drive_helpers.py

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

Loading…
Cancel
Save