mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-22 12:22:06 +08:00
cleanup and fixes
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user