wip
This commit is contained in:
@@ -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
|
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"])
|
else cp_cam.vl["CAM_0x2a4"])
|
||||||
|
|
||||||
if self.CP.nav_msg:
|
# Maybe a try catch?
|
||||||
SpeedLimitController.load_state()
|
SpeedLimitController.load_state()
|
||||||
SpeedLimitController.car_speed_limit = self.calculate_speed_limit_canfd(self.CP, cp, cp_cam) * speed_conv
|
SpeedLimitController.car_speed_limit = self.calculate_speed_limit_canfd(self.CP, cp, cp_cam) * speed_conv
|
||||||
SpeedLimitController.write_car_state()
|
SpeedLimitController.write_car_state()
|
||||||
|
|
||||||
self.custom_speed_up = False
|
self.custom_speed_up = False
|
||||||
self.custom_speed_down = False
|
self.custom_speed_down = False
|
||||||
@@ -472,7 +472,7 @@ class CarState(CarStateBase):
|
|||||||
("SCC_CONTROL", 50),
|
("SCC_CONTROL", 50),
|
||||||
]
|
]
|
||||||
|
|
||||||
if CP.nav_msg:
|
# if CP.nav_msg:
|
||||||
messages.append(("CLUSTER_SPEED_LIMIT", 10))
|
messages.append(("CLUSTER_SPEED_LIMIT", 10))
|
||||||
|
|
||||||
return CANParser(DBC[CP.carFingerprint]["pt"], messages, CanBus(CP).CAM)
|
return CANParser(DBC[CP.carFingerprint]["pt"], messages, CanBus(CP).CAM)
|
||||||
|
|||||||
@@ -291,12 +291,12 @@ class CarInterface(CarInterfaceBase):
|
|||||||
ret.longitudinalActuatorDelayUpperBound = 0.5
|
ret.longitudinalActuatorDelayUpperBound = 0.5
|
||||||
|
|
||||||
# *** feature detection ***
|
# *** feature detection ***
|
||||||
if candidate in CANFD_CAR:
|
# if candidate in CANFD_CAR:
|
||||||
ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN]
|
# ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN]
|
||||||
ret.nav_msg = 0x544 in fingerprint[0]
|
# ret.nav_msg = 0x544 in fingerprint[0]
|
||||||
else:
|
# else:
|
||||||
ret.enableBsm = 0x58b in fingerprint[0]
|
# ret.enableBsm = 0x58b in fingerprint[0]
|
||||||
ret.nav_msg = False
|
# ret.nav_msg = False
|
||||||
|
|
||||||
# *** panda safety config ***
|
# *** panda safety config ***
|
||||||
ret.safetyConfigs = set_safety_config_hyundai(candidate, CAN, can_fd=(candidate in CANFD_CAR))
|
ret.safetyConfigs = set_safety_config_hyundai(candidate, CAN, can_fd=(candidate in CANFD_CAR))
|
||||||
|
|||||||
Reference in New Issue
Block a user