Commit dd10a83 1 parent 86f73a5 commit dd10a83 Copy full SHA for dd10a83
File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -341,8 +341,12 @@ def _update(self, c):
341
341
events .add (EventName .brakeUnavailable )
342
342
343
343
if self .CS .CP .openpilotLongitudinalControl and self .CS .cruise_buttons [- 1 ] != self .CS .prev_cruise_buttons :
344
- ret .buttonEvents = [create_button_event (self .CS .cruise_buttons [- 1 ], self .CS .prev_cruise_buttons , BUTTONS_DICT )]
344
+ buttonEvents = [create_button_event (self .CS .cruise_buttons [- 1 ], self .CS .prev_cruise_buttons , BUTTONS_DICT )]
345
+ # Handle CF_Clu_CruiseSwState changing buttons mid-press
346
+ if self .CS .cruise_buttons [- 1 ] != 0 and self .CS .prev_cruise_buttons != 0 :
347
+ buttonEvents .append (create_button_event (0 , self .CS .prev_cruise_buttons , BUTTONS_DICT ))
345
348
349
+ ret .buttonEvents = buttonEvents
346
350
events .events .extend (create_button_enable_events (ret .buttonEvents ))
347
351
348
352
# low speed steer alert hysteresis logic (only for cars with steer cut off above 10 m/s)
You can’t perform that action at this time.
0 commit comments