From dc27f0de033b5e36f9ed972ad4e3ae005da2ed75 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sat, 12 Nov 2022 02:02:30 -0800 Subject: [PATCH] GM: handle run-away set speed (#26480) * GM: Handle run-away set speed * bumpo * This is a test of both PRs combined * tempbump * Revert "tempbump" This reverts commit b73e04fca25e6a1bac889e44afac6430d5ad7c30. * Revert "This is a test of both PRs combined" This reverts commit 22cc0e6900e0f0470f14ed55e7846e4b1d570826. * fix * bump * fix that * Bump to master * fix fix old-commit-hash: 65f494d845bbfa47293ad3158a68bc38c1b4dcff --- panda | 2 +- selfdrive/car/gm/interface.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/panda b/panda index d573111268..0096d0c4fc 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit d57311126860c9a87edf5b7b9f81a2a038866a26 +Subproject commit 0096d0c4fc50d199ca46c6fe40479e1547408aed diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 49cae998e8..c41aac0ae0 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -211,7 +211,12 @@ class CarInterface(CarInterfaceBase): ret = self.CS.update(self.cp, self.cp_cam, self.cp_loopback) if self.CS.cruise_buttons != self.CS.prev_cruise_buttons and self.CS.prev_cruise_buttons != CruiseButtons.INIT: - ret.buttonEvents = [create_button_event(self.CS.cruise_buttons, self.CS.prev_cruise_buttons, BUTTONS_DICT, CruiseButtons.UNPRESS)] + buttonEvents = [create_button_event(self.CS.cruise_buttons, self.CS.prev_cruise_buttons, BUTTONS_DICT, CruiseButtons.UNPRESS)] + # Handle ACCButtons changing buttons mid-press + if self.CS.cruise_buttons != CruiseButtons.UNPRESS and self.CS.prev_cruise_buttons != CruiseButtons.UNPRESS: + buttonEvents.append(create_button_event(CruiseButtons.UNPRESS, self.CS.prev_cruise_buttons, BUTTONS_DICT, CruiseButtons.UNPRESS)) + + ret.buttonEvents = buttonEvents events = self.create_common_events(ret, extra_gears=[GearShifter.sport, GearShifter.low, GearShifter.eco, GearShifter.manumatic],