|
|
|
@ -45,13 +45,14 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
hda2 = Ecu.adas in [fw.ecu for fw in car_fw] |
|
|
|
|
CAN = CanBus(None, hda2, fingerprint) |
|
|
|
|
|
|
|
|
|
# TODO: detect EV and hybrid |
|
|
|
|
if candidate in HYBRID_CAR: |
|
|
|
|
ret.flags |= HyundaiFlags.HYBRID.value |
|
|
|
|
elif candidate in EV_CAR: |
|
|
|
|
# TODO: detect EV and hybrid for all cars |
|
|
|
|
if candidate in EV_CAR: |
|
|
|
|
ret.flags |= HyundaiFlags.EV.value |
|
|
|
|
|
|
|
|
|
if candidate in CANFD_CAR: |
|
|
|
|
if 0x105 in fingerprint[CAN.ECAN if hda2 else CAN.ECAN]: |
|
|
|
|
ret.flags |= HyundaiFlags.HYBRID.value |
|
|
|
|
|
|
|
|
|
# detect HDA2 with ADAS Driving ECU |
|
|
|
|
if hda2: |
|
|
|
|
if 0x110 in fingerprint[CAN.CAM]: |
|
|
|
@ -69,6 +70,11 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
if candidate not in CANFD_RADAR_SCC_CAR: |
|
|
|
|
ret.flags |= HyundaiFlags.CANFD_CAMERA_SCC.value |
|
|
|
|
else: |
|
|
|
|
if candidate in HYBRID_CAR: |
|
|
|
|
ret.flags |= HyundaiFlags.HYBRID.value |
|
|
|
|
elif candidate in EV_CAR: |
|
|
|
|
ret.flags |= HyundaiFlags.EV.value |
|
|
|
|
|
|
|
|
|
# Send LFA message on cars with HDA |
|
|
|
|
if 0x485 in fingerprint[2]: |
|
|
|
|
ret.flags |= HyundaiFlags.SEND_LFA.value |
|
|
|
|