Subaru Crosstrek Torque increase
Add toggle to increase the torque for the Subaru Crosstrek.
This commit is contained in:
@@ -10,6 +10,8 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
@staticmethod
|
||||
def _get_params(ret, params, candidate, fingerprint, car_fw, experimental_long, docs):
|
||||
crosstrek_torque_increase = params.get_bool("CrosstrekTorque")
|
||||
|
||||
ret.carName = "subaru"
|
||||
ret.radarUnavailable = True
|
||||
# for HYBRID CARS to be upstreamed, we need:
|
||||
@@ -47,9 +49,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerRatio = 13.5
|
||||
ret.steerActuatorDelay = 0.3 # end-to-end angle controller
|
||||
ret.lateralTuning.init('pid')
|
||||
ret.lateralTuning.pid.kf = 0.00003
|
||||
ret.lateralTuning.pid.kf = 0.00003333 if crosstrek_torque_increase else 0.00003
|
||||
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0., 20.], [0., 20.]]
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.0025, 0.1], [0.00025, 0.01]]
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.133, 0.2], [0.0133, 0.02]] if crosstrek_torque_increase else [[0.0025, 0.1], [0.00025, 0.01]]
|
||||
|
||||
elif candidate == CAR.IMPREZA:
|
||||
ret.mass = 1568.
|
||||
|
||||
@@ -27,6 +27,8 @@ class CarControllerParams:
|
||||
self.STEER_DELTA_DOWN = 40
|
||||
elif CP.carFingerprint == CAR.IMPREZA_2020:
|
||||
self.STEER_MAX = 1439
|
||||
elif CP.carFingerprint == CAR.IMPREZA and Params().get_bool("CrosstrekTorque"):
|
||||
self.STEER_MAX = 3071
|
||||
else:
|
||||
self.STEER_MAX = 2047
|
||||
|
||||
|
||||
Reference in New Issue
Block a user