Listen and Read from Bus 2

This commit is contained in:
blue-genie 2024-09-06 07:16:45 -05:00
parent de6354382b
commit e0012025db
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ class CarState(CarStateBase):
ret.steerFaultTemporary |= cp.vl["Lane_Assist_Data3_FD1"]["LatCtlSte_D_Stat"] not in (1, 2, 3)
# cruise state
is_metric = cp.vl["INSTRUMENT_PANEL"]["METRIC_UNITS"] == 1 if not self.CP.flags & FordFlags.CANFD else cp.vl["IPMA_Data2"]["IsaVLimUnit_D_Rq"] == 1
is_metric = cp.vl["INSTRUMENT_PANEL"]["METRIC_UNITS"] == 1 if not self.CP.flags & FordFlags.CANFD else cp_cam.vl["IPMA_Data2"]["IsaVLimUnit_D_Rq"] == 1
ret.cruiseState.speed = cp.vl["EngBrakeData"]["Veh_V_DsplyCcSet"] * (CV.KPH_TO_MS if is_metric else CV.MPH_TO_MS)
ret.cruiseState.enabled = cp.vl["EngBrakeData"]["CcStat_D_Actl"] in (4, 5)
ret.cruiseState.available = cp.vl["EngBrakeData"]["CcStat_D_Actl"] in (3, 4, 5)
@ -171,7 +171,6 @@ class CarState(CarStateBase):
if CP.flags & FordFlags.CANFD:
messages += [
("Lane_Assist_Data3_FD1", 33),
("IPMA_Data2", 1),
]
else:
messages += [
@ -209,6 +208,7 @@ class CarState(CarStateBase):
if CP.flags & FordFlags.CANFD:
messages += [
("Traffic_RecognitnData", 1),
("IPMA_Data2", 1),
]
if CP.enableBsm and CP.flags & FordFlags.CANFD: