diff --git a/panda b/panda index 62db60595b..e95ab7f583 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit 62db60595bb5129cc2f295fdc42f2cda473777fd +Subproject commit e95ab7f5831174bde35b18e766e20e28a0680dae diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index 0b5f724ab9..1ce31552c8 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -126,6 +126,8 @@ class CarController: if self.CP.openpilotLongitudinalControl: if hda2: can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame)) + else: + can_sends.extend(hyundaicanfd.create_fca_warning_light(self.packer, self.CAN, self.frame)) if self.frame % 2 == 0: can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override, set_speed_in_units)) diff --git a/selfdrive/car/hyundai/hyundaicanfd.py b/selfdrive/car/hyundai/hyundaicanfd.py index a35fcb7779..5a775b9a28 100644 --- a/selfdrive/car/hyundai/hyundaicanfd.py +++ b/selfdrive/car/hyundai/hyundaicanfd.py @@ -172,6 +172,20 @@ def create_spas_messages(packer, CAN, frame, left_blink, right_blink): return ret +def create_fca_warning_light(packer, CAN, frame): + ret = [] + if frame % 2 == 0: + values = { + 'AEB_SETTING': 0x1, # show AEB disabled icon + 'SET_ME_2': 0x2, + 'SET_ME_FF': 0xff, + 'SET_ME_FC': 0xfc, + 'SET_ME_9': 0x9, + } + ret.append(packer.make_can_msg("ADRV_0x160", CAN.ECAN, values)) + return ret + + def create_adrv_messages(packer, CAN, frame): # messages needed to car happy after disabling # the ADAS Driving ECU to do longitudinal control @@ -182,15 +196,7 @@ def create_adrv_messages(packer, CAN, frame): } ret.append(packer.make_can_msg("ADRV_0x51", CAN.ACAN, values)) - if frame % 2 == 0: - values = { - 'AEB_SETTING': 0x1, # show AEB disabled icon - 'SET_ME_2': 0x2, - 'SET_ME_FF': 0xff, - 'SET_ME_FC': 0xfc, - 'SET_ME_9': 0x9, - } - ret.append(packer.make_can_msg("ADRV_0x160", CAN.ECAN, values)) + ret.extend(create_fca_warning_light(packer, CAN, frame)) if frame % 5 == 0: values = {