|
|
|
@ -208,8 +208,12 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
|
|
|
|
|
# Don't add event if transitioning from INIT, unless it's to an actual button |
|
|
|
|
if self.CS.cruise_buttons != CruiseButtons.UNPRESS or self.CS.prev_cruise_buttons != CruiseButtons.INIT: |
|
|
|
|
ret.buttonEvents = create_button_events(self.CS.cruise_buttons, self.CS.prev_cruise_buttons, BUTTONS_DICT, |
|
|
|
|
unpressed_btn=CruiseButtons.UNPRESS) |
|
|
|
|
ret.buttonEvents = [ |
|
|
|
|
*create_button_events(self.CS.cruise_buttons, self.CS.prev_cruise_buttons, BUTTONS_DICT, |
|
|
|
|
unpressed_btn=CruiseButtons.UNPRESS), |
|
|
|
|
*create_button_events(self.CS.distance_button, self.CS.prev_distance_button, |
|
|
|
|
{1: ButtonType.gapAdjustCruise}) |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
# The ECM allows enabling on falling edge of set, but only rising edge of resume |
|
|
|
|
events = self.create_common_events(ret, extra_gears=[GearShifter.sport, GearShifter.low, |
|
|
|
|