mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-24 15:32:07 +08:00
Hyundai CAN-FD: common PT bus function cleanup (#27397)
* Hyundai CAN-FD: common PT bus function cleanup * use CP * Update selfdrive/car/hyundai/hyundaicanfd.py --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
from cereal import car
|
||||
from panda import Panda
|
||||
from common.conversions import Conversions as CV
|
||||
from selfdrive.car.hyundai.hyundaicanfd import get_e_can_bus
|
||||
from selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CANFD_CAR, CAMERA_SCC_CAR, CANFD_RADAR_SCC_CAR, EV_CAR, HYBRID_CAR, LEGACY_SAFETY_MODE_CAR, Buttons
|
||||
from selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR
|
||||
from selfdrive.car import STD_CARGO_KG, create_button_event, scale_tire_stiffness, get_safety_config
|
||||
@@ -247,8 +248,7 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
# *** feature detection ***
|
||||
if candidate in CANFD_CAR:
|
||||
bus = 5 if ret.flags & HyundaiFlags.CANFD_HDA2 else 4
|
||||
ret.enableBsm = 0x1e5 in fingerprint[bus]
|
||||
ret.enableBsm = 0x1e5 in fingerprint[get_e_can_bus(ret)]
|
||||
else:
|
||||
ret.enableBsm = 0x58b in fingerprint[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user