Skip to content

Commit

Permalink
Chrysler: remove standstill exception for gas disengage (commaai#23515)
Browse files Browse the repository at this point in the history
* Chrysler: remove standstill exception for gas disengage

* remove test exception

* bump panda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
  • Loading branch information
jyoung8607 and adeebshihadeh authored Jan 14, 2022
1 parent d5f4fdb commit 57156c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion panda
3 changes: 1 addition & 2 deletions selfdrive/car/chrysler/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def update(self, c, can_strings):
ret.steeringRateLimited = self.CC.steer_rate_limited if self.CC is not None else False

# events
events = self.create_common_events(ret, extra_gears=[car.CarState.GearShifter.low],
gas_resume_speed=2.)
events = self.create_common_events(ret, extra_gears=[car.CarState.GearShifter.low])

if ret.vEgo < self.CP.minSteerSpeed:
events.add(car.CarEvent.EventName.belowSteerSpeed)
Expand Down
6 changes: 2 additions & 4 deletions selfdrive/car/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def update(self, c: car.CarControl, can_strings: List[bytes]) -> car.CarState:
def apply(self, c: car.CarControl) -> Tuple[car.CarControl.Actuators, List[bytes]]:
pass

def create_common_events(self, cs_out, extra_gears=None, gas_resume_speed=-1, pcm_enable=True):
def create_common_events(self, cs_out, extra_gears=None, pcm_enable=True):
events = Events()

if cs_out.doorOpen:
Expand Down Expand Up @@ -152,9 +152,7 @@ def create_common_events(self, cs_out, extra_gears=None, gas_resume_speed=-1, pc
events.add(EventName.steerUnavailable)

# Disable on rising edge of gas or brake. Also disable on brake when speed > 0.
# Optionally allow to press gas at zero speed to resume.
# e.g. Chrysler does not spam the resume button yet, so resuming with gas is handy. FIXME!
if (cs_out.gasPressed and (not self.CS.out.gasPressed) and cs_out.vEgo > gas_resume_speed) or \
if (cs_out.gasPressed and not self.CS.out.gasPressed) or \
(cs_out.brakePressed and (not self.CS.out.brakePressed or not cs_out.standstill)):
events.add(EventName.pedalPressed)

Expand Down
8 changes: 0 additions & 8 deletions selfdrive/test/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from selfdrive.car.car_helpers import interfaces
from selfdrive.car.gm.values import CAR as GM
from selfdrive.car.honda.values import HONDA_BOSCH, CAR as HONDA
from selfdrive.car.chrysler.values import CAR as CHRYSLER
from selfdrive.car.hyundai.values import CAR as HYUNDAI
from selfdrive.test.test_routes import routes, non_tested_cars
from selfdrive.test.openpilotci import get_url
Expand All @@ -33,11 +32,6 @@
HYUNDAI.SANTA_FE,
]

ignore_carstate_check = [
# TODO: chrysler gas state in panda also checks wheel speed, refactor so it's only gas
CHRYSLER.PACIFICA_2017_HYBRID,
]

ignore_addr_checks_valid = [
GM.BUICK_REGAL,
HYUNDAI.GENESIS_G70_2020,
Expand Down Expand Up @@ -179,8 +173,6 @@ def test_panda_safety_carstate(self):
"""
if self.CP.dashcamOnly:
self.skipTest("no need to check panda safety for dashcamOnly")
if self.car_model in ignore_carstate_check:
self.skipTest("see comments in test_models.py")

checks = defaultdict(lambda: 0)
CC = car.CarControl.new_message()
Expand Down

0 comments on commit 57156c4

Please sign in to comment.