This commit is contained in:
Your Name
2024-05-12 21:56:49 -05:00
parent b4120aed2e
commit d228405bc8
4 changed files with 14 additions and 14 deletions

View File

@@ -161,11 +161,12 @@ class CarInterface(CarInterfaceBase):
def _update(self, c, frogpilot_variables):
ret = self.CS.update(self.cp, self.cp_cam, frogpilot_variables)
if self.CS.CP.openpilotLongitudinalControl:
ret.buttonEvents = [
*create_button_events(self.CS.cruise_buttons[-1], self.CS.prev_cruise_buttons, BUTTONS_DICT),
*create_button_events(self.CS.lkas_enabled, self.CS.lkas_previously_enabled, {1: FrogPilotButtonType.lkas}),
]
# todo: this check probably needs to be removed on other cars
# if self.CS.CP.openpilotLongitudinalControl:
ret.buttonEvents = [
*create_button_events(self.CS.cruise_buttons[-1], self.CS.prev_cruise_buttons, BUTTONS_DICT),
*create_button_events(self.CS.lkas_enabled, self.CS.lkas_previously_enabled, {1: FrogPilotButtonType.lkas}),
]
# On some newer model years, the CANCEL button acts as a pause/resume button based on the PCM state
# To avoid re-engaging when openpilot cancels, check user engagement intention via buttons