Vehicles - Subaru - Subaru Crosstrek Torque Increase
Increases the maximum allowed torque for the Subaru Crosstrek.
This commit is contained in:
parent
461ee1e274
commit
2fe3ad2309
@ -17,7 +17,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const SteeringLimits SUBARU_STEERING_LIMITS = SUBARU_STEERING_LIMITS_GENERATOR(2047, 50, 70);
|
const SteeringLimits SUBARU_STEERING_LIMITS = SUBARU_STEERING_LIMITS_GENERATOR(3071, 50, 70);
|
||||||
const SteeringLimits SUBARU_GEN2_STEERING_LIMITS = SUBARU_STEERING_LIMITS_GENERATOR(1000, 40, 40);
|
const SteeringLimits SUBARU_GEN2_STEERING_LIMITS = SUBARU_STEERING_LIMITS_GENERATOR(1000, 40, 40);
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@ class CarInterface(CarInterfaceBase):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_params(ret, params, candidate: CAR, fingerprint, car_fw, disable_openpilot_long, experimental_long, docs):
|
def _get_params(ret, params, candidate: CAR, fingerprint, car_fw, disable_openpilot_long, experimental_long, docs):
|
||||||
|
crosstrek_torque_increase = params.get_bool("CrosstrekTorque")
|
||||||
|
|
||||||
ret.carName = "subaru"
|
ret.carName = "subaru"
|
||||||
ret.radarUnavailable = True
|
ret.radarUnavailable = True
|
||||||
# for HYBRID CARS to be upstreamed, we need:
|
# for HYBRID CARS to be upstreamed, we need:
|
||||||
@ -51,9 +53,9 @@ class CarInterface(CarInterfaceBase):
|
|||||||
elif candidate == CAR.IMPREZA:
|
elif candidate == CAR.IMPREZA:
|
||||||
ret.steerActuatorDelay = 0.4 # end-to-end angle controller
|
ret.steerActuatorDelay = 0.4 # end-to-end angle controller
|
||||||
ret.lateralTuning.init('pid')
|
ret.lateralTuning.init('pid')
|
||||||
ret.lateralTuning.pid.kf = 0.00005
|
ret.lateralTuning.pid.kf = 0.00003333 if crosstrek_torque_increase else 0.00005
|
||||||
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0., 20.], [0., 20.]]
|
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]]
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.133, 0.2], [0.0133, 0.02]] if crosstrek_torque_increase else [[0.2, 0.3], [0.02, 0.03]]
|
||||||
|
|
||||||
elif candidate == CAR.IMPREZA_2020:
|
elif candidate == CAR.IMPREZA_2020:
|
||||||
ret.lateralTuning.init('pid')
|
ret.lateralTuning.init('pid')
|
||||||
|
@ -26,6 +26,8 @@ class CarControllerParams:
|
|||||||
self.STEER_DELTA_DOWN = 40
|
self.STEER_DELTA_DOWN = 40
|
||||||
elif CP.carFingerprint == CAR.IMPREZA_2020:
|
elif CP.carFingerprint == CAR.IMPREZA_2020:
|
||||||
self.STEER_MAX = 1439
|
self.STEER_MAX = 1439
|
||||||
|
elif CP.carFingerprint == CAR.IMPREZA and Params().get_bool("CrosstrekTorque"):
|
||||||
|
self.STEER_MAX = 3071
|
||||||
else:
|
else:
|
||||||
self.STEER_MAX = 2047
|
self.STEER_MAX = 2047
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user