|
|
|
@ -266,9 +266,10 @@ class CarInterfaceBase(ABC): |
|
|
|
|
events.add(EventName.steerOverride) |
|
|
|
|
|
|
|
|
|
# Handle button presses |
|
|
|
|
enable_button_presses = len([b for b in cs_out.buttonEvents if b.type in enable_buttons]) |
|
|
|
|
for b in cs_out.buttonEvents: |
|
|
|
|
# Enable OP long on falling edge of enable buttons (defaults to accelCruise and decelCruise, overridable per-port) |
|
|
|
|
if not self.CP.pcmCruise and (b.type in enable_buttons and not b.pressed): |
|
|
|
|
if not self.CP.pcmCruise and (b.type in enable_buttons and not b.pressed) and enable_button_presses == 1: |
|
|
|
|
events.add(EventName.buttonEnable) |
|
|
|
|
# Disable on rising and falling edge of cancel for both stock and OP long |
|
|
|
|
if b.type == ButtonType.cancel: |
|
|
|
|