Merge branch 'master' into dev-priv/master

# Conflicts:
#	panda
This commit is contained in:
Jason Wen
2023-05-28 19:53:22 -04:00
3 changed files with 10 additions and 1 deletions
+1 -1
Submodule panda updated: 5d11b895dc...0f4cd5c26b
+6
View File
@@ -56,6 +56,12 @@ class CarInterface(CarInterfaceBase):
ret.lateralTuning.pid.kf = 0.00005
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0., 20.], [0., 20.]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2, 0.3], [0.02, 0.03]]
# Certain Impreza / Crosstrek EPS use 3071 max value and do not work with stock value/scaling.
if any(fw.ecu == "eps" and fw.fwVersion in (b'z\xc0\x00\x00', b'z\xc0\x04\x00', b'z\xc0\x08\x00', b'\x8a\xc0\x00\x00') for fw in car_fw):
ret.safetyConfigs[0].safetyParam = Panda.FLAG_SUBARU_MAX_STEER_IMPREZA_2018
ret.steerActuatorDelay = 0.18 # measured
ret.lateralTuning.pid.kf = 0.00003333
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.133, 0.2], [0.0133, 0.02]]
elif candidate == CAR.IMPREZA_2020:
ret.mass = 1480. + STD_CARGO_KG
+3
View File
@@ -1,5 +1,6 @@
from dataclasses import dataclass
from enum import IntFlag
from panda import Panda
from typing import Dict, List, Union
from cereal import car
@@ -26,6 +27,8 @@ class CarControllerParams:
self.STEER_DELTA_DOWN = 40
elif CP.carFingerprint == CAR.IMPREZA_2020:
self.STEER_MAX = 1439
elif CP.safetyConfigs[0].safetyParam == Panda.FLAG_SUBARU_MAX_STEER_IMPREZA_2018:
self.STEER_MAX = 3071
else:
self.STEER_MAX = 2047