From a984903298cc3f04ec11c5cc13d5dbdba36b8142 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Mon, 16 Dec 2024 19:51:04 -0500 Subject: [PATCH] Hyundai: Allow controls with Sport and Manumatic Gears (#34113) * Hyundai CAN: Explicitly parse gear shifter values for `EV, HEV, PHEV` * for this pr * more segments * found 4.0! * only print when spornt=4.0 is found * new outputs * bump opendbc * Update selfdrive/car/car_specific.py * delete notebook --------- Co-authored-by: Shane Smiskol --- selfdrive/car/car_specific.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/car_specific.py b/selfdrive/car/car_specific.py index 94afec50e2..9477b36bbb 100644 --- a/selfdrive/car/car_specific.py +++ b/selfdrive/car/car_specific.py @@ -148,7 +148,8 @@ class CarSpecificEvents: # To avoid re-engaging when openpilot cancels, check user engagement intention via buttons # Main button also can trigger an engagement on these cars self.cruise_buttons.append(any(ev.type in HYUNDAI_ENABLE_BUTTONS for ev in CS.buttonEvents)) - events = self.create_common_events(CS, CS_prev, pcm_enable=self.CP.pcmCruise, allow_enable=any(self.cruise_buttons)) + events = self.create_common_events(CS, CS_prev, extra_gears=(GearShifter.sport, GearShifter.manumatic), + pcm_enable=self.CP.pcmCruise, allow_enable=any(self.cruise_buttons)) # low speed steer alert hysteresis logic (only for cars with steer cut off above 10 m/s) if CS.vEgo < (self.CP.minSteerSpeed + 2.) and self.CP.minSteerSpeed > 10.: