|
|
@ -10,6 +10,7 @@ from selfdrive.car.disable_ecu import disable_ecu |
|
|
|
|
|
|
|
|
|
|
|
ButtonType = car.CarState.ButtonEvent.Type |
|
|
|
ButtonType = car.CarState.ButtonEvent.Type |
|
|
|
EventName = car.CarEvent.EventName |
|
|
|
EventName = car.CarEvent.EventName |
|
|
|
|
|
|
|
Ecu = car.CarParams.Ecu |
|
|
|
ENABLE_BUTTONS = (Buttons.RES_ACCEL, Buttons.SET_DECEL, Buttons.CANCEL) |
|
|
|
ENABLE_BUTTONS = (Buttons.RES_ACCEL, Buttons.SET_DECEL, Buttons.CANCEL) |
|
|
|
BUTTONS_DICT = {Buttons.RES_ACCEL: ButtonType.accelCruise, Buttons.SET_DECEL: ButtonType.decelCruise, |
|
|
|
BUTTONS_DICT = {Buttons.RES_ACCEL: ButtonType.accelCruise, Buttons.SET_DECEL: ButtonType.decelCruise, |
|
|
|
Buttons.GAP_DIST: ButtonType.gapAdjustCruise, Buttons.CANCEL: ButtonType.cancel} |
|
|
|
Buttons.GAP_DIST: ButtonType.gapAdjustCruise, Buttons.CANCEL: ButtonType.cancel} |
|
|
@ -33,8 +34,8 @@ class CarInterface(CarInterfaceBase): |
|
|
|
ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, CAR.ELANTRA_GT_I30} |
|
|
|
ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, CAR.ELANTRA_GT_I30} |
|
|
|
|
|
|
|
|
|
|
|
if candidate in CANFD_CAR: |
|
|
|
if candidate in CANFD_CAR: |
|
|
|
# detect HDA2 with LKAS message |
|
|
|
# detect HDA2 with ADAS Driving ECU |
|
|
|
if 0x50 in fingerprint[6]: |
|
|
|
if Ecu.adas in [fw.ecu for fw in car_fw]: |
|
|
|
ret.flags |= HyundaiFlags.CANFD_HDA2.value |
|
|
|
ret.flags |= HyundaiFlags.CANFD_HDA2.value |
|
|
|
else: |
|
|
|
else: |
|
|
|
# non-HDA2 |
|
|
|
# non-HDA2 |
|
|
|