mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-26 10:03:52 +08:00
Hyundai: detect LFA HDA message (#27323)
* detect lfa message * comment * ? * fix * Update ref_commit
This commit is contained in:
@@ -178,11 +178,7 @@ class CarController:
|
||||
hud_control.leadVisible, set_speed_in_units, stopping, CC.cruiseControl.override))
|
||||
|
||||
# 20 Hz LFA MFA message
|
||||
if self.frame % 5 == 0 and self.car_fingerprint in (CAR.SONATA, CAR.PALISADE, CAR.IONIQ, CAR.KIA_NIRO_EV, CAR.KIA_NIRO_HEV_2021,
|
||||
CAR.IONIQ_EV_2020, CAR.IONIQ_PHEV, CAR.KIA_CEED, CAR.KIA_SELTOS, CAR.KONA_EV, CAR.KONA_EV_2022,
|
||||
CAR.ELANTRA_2021, CAR.ELANTRA_HEV_2021, CAR.SONATA_HYBRID, CAR.KONA_HEV, CAR.SANTA_FE_2022,
|
||||
CAR.KIA_K5_2021, CAR.IONIQ_HEV_2022, CAR.SANTA_FE_HEV_2022, CAR.GENESIS_G70_2020, CAR.SANTA_FE_PHEV_2022,
|
||||
CAR.KIA_STINGER_2022, CAR.KIA_K5_HEV_2020):
|
||||
if self.frame % 5 == 0 and self.CP.flags & HyundaiFlags.SEND_LFA.value:
|
||||
can_sends.append(hyundaican.create_lfahda_mfc(self.packer, CC.enabled))
|
||||
|
||||
# 5 Hz ACC options
|
||||
|
||||
@@ -43,6 +43,10 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.flags |= HyundaiFlags.CANFD_ALT_GEARS.value
|
||||
if candidate not in CANFD_RADAR_SCC_CAR:
|
||||
ret.flags |= HyundaiFlags.CANFD_CAMERA_SCC.value
|
||||
else:
|
||||
# Send LFA message on cars with HDA
|
||||
if 0x485 in fingerprint[2]:
|
||||
ret.flags |= HyundaiFlags.SEND_LFA.value
|
||||
|
||||
ret.steerActuatorDelay = 0.1 # Default delay
|
||||
ret.steerLimitTimer = 0.4
|
||||
|
||||
@@ -58,10 +58,9 @@ class HyundaiFlags(IntFlag):
|
||||
CANFD_CAMERA_SCC = 8
|
||||
|
||||
ALT_LIMITS = 16
|
||||
|
||||
ENABLE_BLINKERS = 32
|
||||
|
||||
CANFD_ALT_GEARS_2 = 64
|
||||
SEND_LFA = 128
|
||||
|
||||
|
||||
class CAR:
|
||||
|
||||
@@ -1 +1 @@
|
||||
5244c5fea84822bdbcd899a280090e47fb0581b7
|
||||
3629f9d22d0bd70cc9ac19cf2045a6cd47b21fdb
|
||||
|
||||
Reference in New Issue
Block a user