mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 12:32:06 +08:00
move kona limit to car controller
old-commit-hash: bd432eb76bf4c2d99a0f66b3a1df0067adb81a1a
This commit is contained in:
@@ -52,7 +52,12 @@ class CarController:
|
||||
hud_control = CC.hudControl
|
||||
|
||||
# Steering Torque
|
||||
new_steer = int(round(actuators.steer * self.params.STEER_MAX))
|
||||
|
||||
# These cars have significantly more torque than most HKG. Limit to 70% of max.
|
||||
steer = actuators.steer
|
||||
if self.CP.carFingerprint in (CAR.KONA, CAR.KONA_EV, CAR.KONA_HEV):
|
||||
steer = clip(steer, -0.7, 0.7)
|
||||
new_steer = int(round(steer * self.params.STEER_MAX))
|
||||
apply_steer = apply_std_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, self.params)
|
||||
self.steer_rate_limited = new_steer != apply_steer
|
||||
|
||||
|
||||
@@ -33,10 +33,6 @@ class CarControllerParams:
|
||||
CAR.KIA_OPTIMA_H, CAR.KIA_SORENTO, CAR.KIA_STINGER):
|
||||
self.STEER_MAX = 255
|
||||
|
||||
# These cars have significantly more torque than most HKG. Limit to 70% of max.
|
||||
elif CP.carFingerprint in (CAR.KONA, CAR.KONA_EV, CAR.KONA_HEV):
|
||||
self.STEER_MAX = 270
|
||||
|
||||
# Default for most HKG
|
||||
else:
|
||||
self.STEER_MAX = 384
|
||||
|
||||
Reference in New Issue
Block a user