diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index b72615c712..d4ca3a9ec7 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -258,15 +258,16 @@ class CarState(CarStateBase): ("SAS11", 100), ] - if not CP.openpilotLongitudinalControl and CP.carFingerprint not in CAMERA_SCC_CAR and not (CP.flags & HyundaiFlags.CAN_CANFD.value): - messages += [ - ("SCC11", 50), - ("SCC12", 50), - ] - if CP.flags & HyundaiFlags.USE_FCA.value: - messages.append(("FCA11", 50)) - elif CP.flags & HyundaiFlags.CAN_CANFD.value: - messages.append(("SCC12", 50)) + if not CP.openpilotLongitudinalControl: + if CP.flags & HyundaiFlags.CAN_CANFD.value: + messages.append(("SCC12", 50)) + elif CP.carFingerprint not in CAMERA_SCC_CAR: + messages += [ + ("SCC11", 50), + ("SCC12", 50), + ] + if CP.flags & HyundaiFlags.USE_FCA.value: + messages.append(("FCA11", 50)) if CP.enableBsm: freq_lca11 = 20 if CP.flags & HyundaiFlags.CAN_CANFD.value else 50 @@ -294,7 +295,7 @@ class CarState(CarStateBase): @staticmethod def get_cam_can_parser(CP): - if CP.carFingerprint in CANFD_CAR: + if CP.carFingerprint in (CANFD_CAR - CAN_CANFD_CAR): return CarState.get_cam_can_parser_canfd(CP) messages = [] diff --git a/selfdrive/car/hyundai/hyundaican.py b/selfdrive/car/hyundai/hyundaican.py index 6e3afe9ab8..485465df2a 100644 --- a/selfdrive/car/hyundai/hyundaican.py +++ b/selfdrive/car/hyundai/hyundaican.py @@ -1,5 +1,5 @@ import crcmod -from selfdrive.car.hyundai.hyundaicanfd import CanBus +from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, CAR, CHECKSUM, CAMERA_SCC_CAR hyundai_checksum = crcmod.mkCrcFun(0x11D, initCrc=0xFD, rev=False, xorOut=0xdf)