|
|
|
@ -57,7 +57,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 |
|
|
|
|
is_metric = cp.vl["INSTRUMENT_PANEL"]["METRIC_UNITS"] == 1 if not self.CP.flags & FordFlags.CANFD else False |
|
|
|
|
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) |
|
|
|
@ -121,7 +121,6 @@ class CarState(CarStateBase): |
|
|
|
|
("BrakeSnData_4", 50), |
|
|
|
|
("EngBrakeData", 10), |
|
|
|
|
("Cluster_Info1_FD1", 10), |
|
|
|
|
("INSTRUMENT_PANEL", 10), |
|
|
|
|
("SteeringPinion_Data", 100), |
|
|
|
|
("EPAS_INFO", 50), |
|
|
|
|
("Steering_Data_FD1", 10), |
|
|
|
@ -133,6 +132,10 @@ class CarState(CarStateBase): |
|
|
|
|
messages += [ |
|
|
|
|
("Lane_Assist_Data3_FD1", 33), |
|
|
|
|
] |
|
|
|
|
else: |
|
|
|
|
messages += [ |
|
|
|
|
("INSTRUMENT_PANEL", 10), |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if CP.transmissionType == TransmissionType.automatic: |
|
|
|
|
messages += [ |
|
|
|
|