mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-21 01:02:48 +08:00
Hyundai: CAN-FD blindspot signals (#26229)
* Hyundai: CAN-FD blindspot signals * fix that * update refs old-commit-hash: 339253bc05179530e47509e548c482495fbc6e82
This commit is contained in:
+1
-1
Submodule opendbc updated: 7bd94e3ff4...a95b0ae8a5
@@ -187,6 +187,9 @@ class CarState(CarStateBase):
|
||||
|
||||
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(50, cp.vl["BLINKERS"]["LEFT_LAMP"],
|
||||
cp.vl["BLINKERS"]["RIGHT_LAMP"])
|
||||
if self.CP.enableBsm:
|
||||
ret.leftBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"]["FL_INDICATOR"] != 0
|
||||
ret.rightBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"]["FR_INDICATOR"] != 0
|
||||
|
||||
ret.cruiseState.available = True
|
||||
self.is_metric = cp.vl["CLUSTER_INFO"]["DISTANCE_UNIT"] != 1
|
||||
@@ -450,6 +453,15 @@ class CarState(CarStateBase):
|
||||
("DOORS_SEATBELTS", 4),
|
||||
]
|
||||
|
||||
if CP.enableBsm:
|
||||
signals += [
|
||||
("FL_INDICATOR", "BLINDSPOTS_REAR_CORNERS"),
|
||||
("FR_INDICATOR", "BLINDSPOTS_REAR_CORNERS"),
|
||||
]
|
||||
checks += [
|
||||
("BLINDSPOTS_REAR_CORNERS", 20),
|
||||
]
|
||||
|
||||
if CP.flags & HyundaiFlags.CANFD_HDA2 and not CP.openpilotLongitudinalControl:
|
||||
signals += [
|
||||
("CRUISE_STATUS", "CRUISE_INFO"),
|
||||
|
||||
@@ -311,6 +311,13 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.vEgoStarting = 0.1
|
||||
ret.startAccel = 2.0
|
||||
|
||||
# *** feature detection ***
|
||||
if candidate in CANFD_CAR:
|
||||
bus = 5 if ret.flags & HyundaiFlags.CANFD_HDA2 else 4
|
||||
ret.enableBsm = 0x1e5 in fingerprint[bus]
|
||||
else:
|
||||
ret.enableBsm = 0x58b in fingerprint[0]
|
||||
|
||||
# *** panda safety config ***
|
||||
if candidate in CANFD_CAR:
|
||||
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.noOutput),
|
||||
@@ -321,8 +328,6 @@ class CarInterface(CarInterfaceBase):
|
||||
if ret.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||
ret.safetyConfigs[1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_ALT_BUTTONS
|
||||
else:
|
||||
ret.enableBsm = 0x58b in fingerprint[0]
|
||||
|
||||
if candidate in LEGACY_SAFETY_MODE_CAR:
|
||||
# these cars require a special panda safety mode due to missing counters and checksums in the messages
|
||||
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.hyundaiLegacy)]
|
||||
|
||||
@@ -1 +1 @@
|
||||
9d042d06f61c8f48e8c7a4e30001630c14712272
|
||||
68457035e9223fcbd70bd40966d5a1d9fe4f1567
|
||||
Reference in New Issue
Block a user