mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 08:22:05 +08:00
only check BSM on sonata for now, not equipped on all HKG
This commit is contained in:
@@ -120,8 +120,9 @@ class CarState(CarStateBase):
|
||||
ret.stockAeb = cp.vl["SCC12"]['AEB_CmdAct'] != 0
|
||||
ret.stockFcw = cp.vl["SCC12"]['CF_VSM_Warn'] == 2
|
||||
|
||||
ret.leftBlindspot = cp.vl["LCA11"]["CF_Lca_IndLeft"] != 0
|
||||
ret.rightBlindspot = cp.vl["LCA11"]["CF_Lca_IndRight"] != 0
|
||||
if self.CP.carFingerprint in FEATURES["use_bsm"]:
|
||||
ret.leftBlindspot = cp.vl["LCA11"]["CF_Lca_IndLeft"] != 0
|
||||
ret.rightBlindspot = cp.vl["LCA11"]["CF_Lca_IndRight"] != 0
|
||||
|
||||
# save the entire LKAS11 and CLU11
|
||||
self.lkas11 = cp_cam.vl["LKAS11"]
|
||||
@@ -179,9 +180,6 @@ class CarState(CarStateBase):
|
||||
|
||||
("CF_Lvr_GearInf", "LVR11", 0), # Transmission Gear (0 = N or P, 1-8 = Fwd, 14 = Rev)
|
||||
|
||||
("CF_Lca_IndLeft", "LCA11", 0),
|
||||
("CF_Lca_IndRight", "LCA11", 0),
|
||||
|
||||
("CR_Mdps_StrColTq", "MDPS12", 0),
|
||||
("CF_Mdps_ToiActive", "MDPS12", 0),
|
||||
("CF_Mdps_ToiUnavail", "MDPS12", 0),
|
||||
@@ -211,9 +209,15 @@ class CarState(CarStateBase):
|
||||
("SAS11", 100),
|
||||
("SCC11", 50),
|
||||
("SCC12", 50),
|
||||
("LCA11", 50),
|
||||
]
|
||||
|
||||
if CP.carFingerprint in FEATURES["use_bsm"]:
|
||||
signals += [
|
||||
("CF_Lca_IndLeft", "LCA11", 0),
|
||||
("CF_Lca_IndRight", "LCA11", 0),
|
||||
]
|
||||
checks += [("LCA11", 50)]
|
||||
|
||||
if CP.carFingerprint in EV_HYBRID:
|
||||
signals += [
|
||||
("Accel_Pedal_Pos", "E_EMS11", 0),
|
||||
|
||||
@@ -213,6 +213,8 @@ FEATURES = {
|
||||
|
||||
# these cars use the FCA11 message for the AEB and FCW signals, all others use SCC12
|
||||
"use_fca": [CAR.SONATA, CAR.ELANTRA, CAR.ELANTRA_GT_I30, CAR.KIA_STINGER, CAR.IONIQ, CAR.KONA, CAR.KONA_EV, CAR.KIA_FORTE, CAR.PALISADE],
|
||||
|
||||
"use_bsm": [CAR.SONATA],
|
||||
}
|
||||
|
||||
EV_HYBRID = [CAR.IONIQ_EV_LTD, CAR.IONIQ, CAR.KONA_EV]
|
||||
|
||||
Reference in New Issue
Block a user