Increase HKG torque limit (#2249)

* increase hkg torque limit

* update refs

* bump panda
This commit is contained in:
Adeeb Shihadeh
2020-10-01 13:16:51 -07:00
committed by GitHub
parent 809b427e72
commit 67aec50b88
4 changed files with 16 additions and 10 deletions
+1 -1
Submodule panda updated: 09997428f3...9fb584b20c
+4 -2
View File
@@ -43,11 +43,13 @@ class CarController():
self.steer_rate_limited = False
self.last_resume_frame = 0
self.p = SteerLimitParams(CP)
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, visual_alert,
left_lane, right_lane, left_lane_depart, right_lane_depart):
# Steering Torque
new_steer = actuators.steer * SteerLimitParams.STEER_MAX
apply_steer = apply_std_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, SteerLimitParams)
new_steer = actuators.steer * self.p.STEER_MAX
apply_steer = apply_std_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, self.p)
self.steer_rate_limited = new_steer != apply_steer
# disable if steer angle reach 90 deg, otherwise mdps fault in some models
+10 -6
View File
@@ -6,12 +6,16 @@ Ecu = car.CarParams.Ecu
# Steer torque limits
class SteerLimitParams:
STEER_MAX = 255 # 409 is the max, 255 is stock
STEER_DELTA_UP = 3
STEER_DELTA_DOWN = 7
STEER_DRIVER_ALLOWANCE = 50
STEER_DRIVER_MULTIPLIER = 2
STEER_DRIVER_FACTOR = 1
def __init__(self, CP):
if CP.carFingerprint in [CAR.SONATA, CAR.PALISADE]:
self.STEER_MAX = 384
else:
self.STEER_MAX = 255
self.STEER_DELTA_UP = 3
self.STEER_DELTA_DOWN = 7
self.STEER_DRIVER_ALLOWANCE = 50
self.STEER_DRIVER_MULTIPLIER = 2
self.STEER_DRIVER_FACTOR = 1
class CAR:
+1 -1
View File
@@ -1 +1 @@
45b676ebf79e402b5482b5fbadcc8147fdb8a1f8
eaa9ac421abee09dfc2bac3b85423d3980f6e67b