use this instead

This commit is contained in:
Jason Wen
2023-08-18 10:51:31 -04:00
parent 42e842324a
commit f6be6beb2b
+6 -14
View File
@@ -27,13 +27,13 @@ class CarControllerParams:
self.STEER_STEP = 1 # 100 Hz
if CP.carFingerprint in CANFD_CAR:
self.STEER_MAX = 270
self.STEER_DRIVER_ALLOWANCE = 250
upstream_taco = CP.safetyConfigs[-1].safetyParam == Panda.FLAG_HYUNDAI_UPSTREAM_TACO
self.STEER_MAX = 270 if not upstream_taco else 384 if vEgoRaw < 11. else 330
self.STEER_DRIVER_ALLOWANCE = 250 if not upstream_taco else 350
self.STEER_DRIVER_MULTIPLIER = 2
self.STEER_THRESHOLD = 250
self.STEER_DELTA_UP = 2
self.STEER_DELTA_DOWN = 3
self.upstream_taco(CP, vEgoRaw)
self.STEER_THRESHOLD = 250 if not upstream_taco else 350
self.STEER_DELTA_UP = 2 if not upstream_taco else 10 if vEgoRaw < 11. else 2
self.STEER_DELTA_DOWN = 3 if not upstream_taco else 10 if vEgoRaw < 11. else 3
# To determine the limit for your car, find the maximum value that the stock LKAS will request.
# If the max stock LKAS request is <384, add your car to this list.
@@ -52,14 +52,6 @@ class CarControllerParams:
else:
self.STEER_MAX = 384
def upstream_taco(self, CP, v_ego_raw):
if CP.safetyConfigs[-1].safetyParam == Panda.FLAG_HYUNDAI_UPSTREAM_TACO:
self.STEER_MAX = 384 if v_ego_raw < 11. else 330
self.STEER_DRIVER_ALLOWANCE = 350
self.STEER_THRESHOLD = 350
self.STEER_DELTA_UP = 10 if v_ego_raw < 11. else 2
self.STEER_DELTA_DOWN = 10 if v_ego_raw < 11. else 3
class HyundaiFlags(IntFlag):
CANFD_HDA2 = 1