This commit is contained in:
Your Name
2024-02-05 02:27:20 -06:00
parent 9213866846
commit 377c6e3021
2 changed files with 12 additions and 12 deletions

View File

@@ -296,10 +296,10 @@ class CarState(CarStateBase):
self.hda2_lfa_block_msg = copy.copy(cp_cam.vl["CAM_0x362"] if self.CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING
else cp_cam.vl["CAM_0x2a4"])
if self.CP.nav_msg:
SpeedLimitController.load_state()
SpeedLimitController.car_speed_limit = self.calculate_speed_limit_canfd(self.CP, cp, cp_cam) * speed_conv
SpeedLimitController.write_car_state()
# Maybe a try catch?
SpeedLimitController.load_state()
SpeedLimitController.car_speed_limit = self.calculate_speed_limit_canfd(self.CP, cp, cp_cam) * speed_conv
SpeedLimitController.write_car_state()
self.custom_speed_up = False
self.custom_speed_down = False
@@ -472,7 +472,7 @@ class CarState(CarStateBase):
("SCC_CONTROL", 50),
]
if CP.nav_msg:
messages.append(("CLUSTER_SPEED_LIMIT", 10))
# if CP.nav_msg:
messages.append(("CLUSTER_SPEED_LIMIT", 10))
return CANParser(DBC[CP.carFingerprint]["pt"], messages, CanBus(CP).CAM)

View File

@@ -291,12 +291,12 @@ class CarInterface(CarInterfaceBase):
ret.longitudinalActuatorDelayUpperBound = 0.5
# *** feature detection ***
if candidate in CANFD_CAR:
ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN]
ret.nav_msg = 0x544 in fingerprint[0]
else:
ret.enableBsm = 0x58b in fingerprint[0]
ret.nav_msg = False
# if candidate in CANFD_CAR:
# ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN]
# ret.nav_msg = 0x544 in fingerprint[0]
# else:
# ret.enableBsm = 0x58b in fingerprint[0]
# ret.nav_msg = False
# *** panda safety config ***
ret.safetyConfigs = set_safety_config_hyundai(candidate, CAN, can_fd=(candidate in CANFD_CAR))