diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index 148f92ae42..95db131139 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -123,7 +123,7 @@ class CarController(CarControllerBase): # LFA and HDA icons if self.frame % 5 == 0 and (not hda2 or hda2_long): - can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled)) + can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled, can_canfd)) # blinkers if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS: diff --git a/selfdrive/car/hyundai/hyundaicanfd.py b/selfdrive/car/hyundai/hyundaicanfd.py index c519914ad1..e1deb46644 100644 --- a/selfdrive/car/hyundai/hyundaicanfd.py +++ b/selfdrive/car/hyundai/hyundaicanfd.py @@ -165,12 +165,17 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy): }) return packer.make_can_msg("SCC_CONTROL", CAN.ECAN, values) -def create_lfahda_cluster(packer, CAN, enabled): +def create_lfahda_cluster(packer, CAN, enabled, can_canfd): + hda_icon = "HDA_Icon_State" if can_canfd else "HDA_ICON" + lfa_icon = "LFA_Icon_State" if can_canfd else "LFA_ICON" + values = { - "HDA_ICON": 1 if enabled else 0, - "LFA_ICON": 2 if enabled else 0, + hda_icon: 1 if enabled else 0, + lfa_icon: 2 if enabled else 0, } - return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values) + + msg = "LFAHDA_MFC" if can_canfd else "LFAHDA_CLUSTER" + return packer.make_can_msg(msg, CAN.ECAN, values) def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_override, set_speed):