|  |  |  | @ -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, ChryslerFlags | 
			
		
	
		
			
				
					|  |  |  |  | from selfdrive.car.interfaces import CarInterfaceBase | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -24,9 +24,12 @@ 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. | 
			
		
	
		
			
				
					|  |  |  |  |     if candidate not in RAM_CARS: | 
			
		
	
		
			
				
					|  |  |  |  |       # Newer FW versions standard on the following platforms, or flashed by a dealer onto older platforms have a higher minimum steering speed. | 
			
		
	
		
			
				
					|  |  |  |  |       new_eps_platform = candidate in (CAR.PACIFICA_2019_HYBRID, CAR.PACIFICA_2020, CAR.JEEP_CHEROKEE_2019) | 
			
		
	
		
			
				
					|  |  |  |  |       new_eps_firmware = any(fw.ecu == 'eps' and fw.fwVersion[:4] >= b"6841" for fw in car_fw) | 
			
		
	
		
			
				
					|  |  |  |  |       if new_eps_platform or new_eps_firmware: | 
			
		
	
		
			
				
					|  |  |  |  |         ret.flags |= ChryslerFlags.HIGHER_MIN_STEERING_SPEED.value | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     # Chrysler | 
			
		
	
		
			
				
					|  |  |  |  |     if candidate in (CAR.PACIFICA_2017_HYBRID, CAR.PACIFICA_2018, CAR.PACIFICA_2018_HYBRID, CAR.PACIFICA_2019_HYBRID, CAR.PACIFICA_2020): | 
			
		
	
	
		
			
				
					|  |  |  | @ -55,10 +58,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.startswith((b"68312176", b"68273275")): | 
			
		
	
		
			
				
					|  |  |  |  |           ret.minSteerSpeed = 0. | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.RAM_HD: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerActuatorDelay = 0.2 | 
			
		
	
	
		
			
				
					|  |  |  | @ -71,6 +73,10 @@ class CarInterface(CarInterfaceBase): | 
			
		
	
		
			
				
					|  |  |  |  |     else: | 
			
		
	
		
			
				
					|  |  |  |  |       raise ValueError(f"Unsupported car: {candidate}") | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if ret.flags & ChryslerFlags.HIGHER_MIN_STEERING_SPEED: | 
			
		
	
		
			
				
					|  |  |  |  |       # 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. | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     ret.centerToFront = ret.wheelbase * 0.44 | 
			
		
	
		
			
				
					|  |  |  |  |     ret.enableBsm = 720 in fingerprint[0] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |