mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +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: 542345a7c2
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