From 9068f431053b5ee0b04e260c2549f39ca75a36b6 Mon Sep 17 00:00:00 2001 From: Kevin Robert Keegan Date: Sun, 4 Sep 2022 16:11:30 -0700 Subject: [PATCH] :b: Allow Sport Gear Use; Enables Engine Braking on Downhill --- selfdrive/car/toyota/interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 3ea05f9fef57b9..e5be320dc26759 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -10,6 +10,7 @@ ButtonType = car.CarState.ButtonEvent.Type EventName = car.CarEvent.EventName SteerControlType = car.CarParams.SteerControlType +GearShifter = car.CarState.GearShifter class CarInterface(CarInterfaceBase): @@ -176,7 +177,7 @@ def _update(self, c): ret.buttonEvents = create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}) # events - events = self.create_common_events(ret) + events = self.create_common_events(ret, extra_gears=[GearShifter.sport]) # Lane Tracing Assist control is unavailable (EPS_STATUS->LTA_STATE=0) until # the more accurate angle sensor signal is initialized