mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 02:52:04 +08:00
Hyundai CAN-FD: use common PT bus function (#27268)
* Hyundai CAN-FD: PT bus detection cleanup * Do this when ICE CAN-FD is supported! * Only needs to be checked for non-HDA2, HDA2 uses 0x1cf * Unused Co-authored-by: Shane Smiskol <shane@smiskol.com> * Keep it the same for now --------- Co-authored-by: Shane Smiskol <shane@smiskol.com> old-commit-hash: 542345a7c2606e0c2ea9b88c7d91a22c3a97f88a
This commit is contained in:
@@ -6,6 +6,7 @@ from cereal import car
|
||||
from common.conversions import Conversions as CV
|
||||
from opendbc.can.parser import CANParser
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from selfdrive.car.hyundai.hyundaicanfd import get_e_can_bus
|
||||
from selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, FEATURES, CAMERA_SCC_CAR, CANFD_CAR, EV_CAR, HYBRID_CAR, Buttons, CarControllerParams
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
|
||||
@@ -515,8 +516,7 @@ class CarState(CarStateBase):
|
||||
("ACCELERATOR_BRAKE_ALT", 100),
|
||||
]
|
||||
|
||||
bus = 5 if CP.flags & HyundaiFlags.CANFD_HDA2 else 4
|
||||
return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, bus)
|
||||
return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, get_e_can_bus(CP))
|
||||
|
||||
@staticmethod
|
||||
def get_cam_can_parser_canfd(CP):
|
||||
|
||||
Reference in New Issue
Block a user