|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
from cereal import car |
|
|
|
|
from panda import Panda |
|
|
|
|
from selfdrive.car import STD_CARGO_KG, get_safety_config |
|
|
|
|
from selfdrive.car.chrysler.values import CAR, DBC, RAM_HD, RAM_DT |
|
|
|
|
from selfdrive.car.chrysler.values import CAR, DBC, RAM_HD, RAM_DT, RAM_CARS |
|
|
|
|
from selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -24,9 +24,13 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_CHRYSLER_RAM_DT |
|
|
|
|
|
|
|
|
|
ret.minSteerSpeed = 3.8 # m/s |
|
|
|
|
if candidate in (CAR.PACIFICA_2019_HYBRID, CAR.PACIFICA_2020, CAR.JEEP_CHEROKEE_2019): |
|
|
|
|
# TODO: allow 2019 cars to steer down to 13 m/s if already engaged. |
|
|
|
|
ret.minSteerSpeed = 17.5 # m/s 17 on the way up, 13 on the way down once engaged. |
|
|
|
|
# Traditionally, CAR.PACIFICA_2019_HYBRID, CAR.PACIFICA_2020, CAR.JEEP_CHEROKEE_2019 have newer firmware with higher steering speeds. |
|
|
|
|
# However, the dealer can reflash the EPS in older cars with newer firmware, raising their minimum steering speed with it. |
|
|
|
|
if candidate not in RAM_CARS: |
|
|
|
|
for fw in car_fw: |
|
|
|
|
if fw.ecu == 'eps' and fw.fwVersion[:4] >= b"6852": |
|
|
|
|
# TODO: allow these cars to steer down to 13 m/s if already engaged. |
|
|
|
|
ret.minSteerSpeed = 17.5 # m/s 17 on the way up, 13 on the way down once engaged. |
|
|
|
|
|
|
|
|
|
# Chrysler |
|
|
|
|
if candidate in (CAR.PACIFICA_2017_HYBRID, CAR.PACIFICA_2018, CAR.PACIFICA_2018_HYBRID, CAR.PACIFICA_2019_HYBRID, CAR.PACIFICA_2020): |
|
|
|
@ -55,10 +59,9 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.mass = 2493. + STD_CARGO_KG |
|
|
|
|
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) |
|
|
|
|
ret.minSteerSpeed = 14.5 |
|
|
|
|
if car_fw is not None: |
|
|
|
|
for fw in car_fw: |
|
|
|
|
if fw.ecu == 'eps' and fw.fwVersion[:8] in (b"68312176", b"68273275"): |
|
|
|
|
ret.minSteerSpeed = 0. |
|
|
|
|
for fw in car_fw: |
|
|
|
|
if fw.ecu == 'eps' and fw.fwVersion[:8] in (b"68312176", b"68273275"): |
|
|
|
|
ret.minSteerSpeed = 0. |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.RAM_HD: |
|
|
|
|
ret.steerActuatorDelay = 0.2 |
|
|
|
|