diff --git a/selfdrive/car/ford/carstate.py b/selfdrive/car/ford/carstate.py index e58d9fde1..2388d64ae 100644 --- a/selfdrive/car/ford/carstate.py +++ b/selfdrive/car/ford/carstate.py @@ -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: