selfdrive.car.ford package
Subpackages
- selfdrive.car.ford.tests package
- Submodules
- selfdrive.car.ford.tests.test_ford module
TestFordFW
TestFordFW.test_fw_query_config()
TestFordFW.test_fw_versions
TestFordFW.test_fw_versions_0_FORD_BRONCO_SPORT_MK1()
TestFordFW.test_fw_versions_1_FORD_ESCAPE_MK4()
TestFordFW.test_fw_versions_2_FORD_EXPLORER_MK6()
TestFordFW.test_fw_versions_3_FORD_F_150_MK14()
TestFordFW.test_fw_versions_4_FORD_F_150_LIGHTNING_MK1()
TestFordFW.test_fw_versions_5_FORD_MUSTANG_MACH_E_MK1()
TestFordFW.test_fw_versions_6_FORD_FOCUS_MK4()
TestFordFW.test_fw_versions_7_FORD_MAVERICK_MK1()
TestFordFW.test_fw_versions_8_FORD_RANGER_MK2()
- Module contents
Submodules
selfdrive.car.ford.carcontroller module
selfdrive.car.ford.carstate module
selfdrive.car.ford.fingerprints module
selfdrive.car.ford.fordcan module
- class selfdrive.car.ford.fordcan.CanBus(CP=None, fingerprint=None)[source]
Bases:
CanBusBase
- property camera: int
- property main: int
- property radar: int
- selfdrive.car.ford.fordcan.calculate_lat_ctl2_checksum(mode: int, counter: int, dat: bytearray) int [source]
- selfdrive.car.ford.fordcan.create_acc_msg(packer, CAN: CanBus, long_active: bool, gas: float, accel: float, stopping: bool, v_ego_kph: float)[source]
Creates a CAN message for the Ford ACC Command.
This command can be used to enable ACC, to set the ACC gas/brake/decel values and to disable ACC.
Frequency is 50Hz.
- selfdrive.car.ford.fordcan.create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, fcw_alert: bool, standstill: bool, hud_control, stock_values: dict)[source]
Creates a CAN message for the Ford IPC adaptive cruise, forward collision warning and traffic jam assist status.
Stock functionality is maintained by passing through unmodified signals.
Frequency is 5Hz.
- selfdrive.car.ford.fordcan.create_button_msg(packer, bus: int, stock_values: dict, cancel=False, resume=False, tja_toggle=False)[source]
Creates a CAN message for the Ford SCCM buttons/switches.
Includes cruise control buttons, turn lights and more.
Frequency is 10Hz.
- selfdrive.car.ford.fordcan.create_lat_ctl2_msg(packer, CAN: CanBus, mode: int, path_offset: float, path_angle: float, curvature: float, curvature_rate: float, counter: int)[source]
Create a CAN message for the new Ford Lane Centering command.
This message is used on the CAN FD platform and replaces the old LateralMotionControl message. It is similar but has additional signals for a counter and checksum.
Frequency is 20Hz.
- selfdrive.car.ford.fordcan.create_lat_ctl_msg(packer, CAN: CanBus, lat_active: bool, path_offset: float, path_angle: float, curvature: float, curvature_rate: float)[source]
Creates a CAN message for the Ford TJA/LCA Command.
This command can apply “Lane Centering” manoeuvres: continuous lane centering for traffic jam assist and highway driving. It is not subject to the PSCM lockout.
Ford lane centering command uses a third order polynomial to describe the road centerline. The polynomial is defined by the following coefficients:
c0: lateral offset between the vehicle and the centerline (positive is right) c1: heading angle between the vehicle and the centerline (positive is right) c2: curvature of the centerline (positive is left) c3: rate of change of curvature of the centerline
As the PSCM combines this information with other sensor data, such as the vehicle’s yaw rate and speed, the steering angle cannot be easily controlled.
The PSCM should be configured to accept TJA/LCA commands before these commands will be processed. This can be done using tools such as Forscan.
Frequency is 20Hz.
- selfdrive.car.ford.fordcan.create_lka_msg(packer, CAN: CanBus)[source]
Creates an empty CAN message for the Ford LKA Command.
This command can apply “Lane Keeping Aid” manoeuvres, which are subject to the PSCM lockout.
Frequency is 33Hz.
- selfdrive.car.ford.fordcan.create_lkas_ui_msg(packer, CAN: CanBus, main_on: bool, enabled: bool, steer_alert: bool, hud_control, stock_values: dict)[source]
Creates a CAN message for the Ford IPC IPMA/LKAS status.
Show the LKAS status with the “driver assist” lines in the IPC.
Stock functionality is maintained by passing through unmodified signals.
Frequency is 1Hz.
selfdrive.car.ford.interface module
selfdrive.car.ford.radar_interface module
selfdrive.car.ford.values module
- class selfdrive.car.ford.values.CAR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Platforms
- FORD_BRONCO_SPORT_MK1 = 'FORD_BRONCO_SPORT_MK1'
- FORD_ESCAPE_MK4 = 'FORD_ESCAPE_MK4'
- FORD_EXPLORER_MK6 = 'FORD_EXPLORER_MK6'
- FORD_FOCUS_MK4 = 'FORD_FOCUS_MK4'
- FORD_F_150_LIGHTNING_MK1 = 'FORD_F_150_LIGHTNING_MK1'
- FORD_F_150_MK14 = 'FORD_F_150_MK14'
- FORD_MAVERICK_MK1 = 'FORD_MAVERICK_MK1'
- FORD_MUSTANG_MACH_E_MK1 = 'FORD_MUSTANG_MACH_E_MK1'
- FORD_RANGER_MK2 = 'FORD_RANGER_MK2'
- config: PlatformConfig
- class selfdrive.car.ford.values.CarControllerParams(CP)[source]
Bases:
object
- ACCEL_MAX = 2.0
- ACCEL_MIN = -3.5
- ACC_CONTROL_STEP = 2
- ACC_UI_STEP = 20
- ANGLE_RATE_LIMIT_DOWN = ([5, 25], [0.000225, 0.00015])
- ANGLE_RATE_LIMIT_UP = ([5, 25], [0.0002, 0.0001])
- BUTTONS_STEP = 5
- CURVATURE_ERROR = 0.002
- CURVATURE_MAX = 0.02
- INACTIVE_GAS = -5.0
- LKAS_UI_STEP = 100
- LKA_STEP = 3
- MIN_GAS = -0.5
- STEER_DRIVER_ALLOWANCE = 1.0
- STEER_STEP = 5
- class selfdrive.car.ford.values.Footnote(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
- FOCUS = ('Refers only to the Focus Mk4 (C519) available in Europe/China/Taiwan/Australasia, not the Focus Mk3 (C346) in North and South America/Southeast Asia.', Column.MODEL, False, False)
- class selfdrive.car.ford.values.FordCANFDPlatformConfig(car_docs: list[openpilot.selfdrive.car.docs_definitions.CarDocs], specs: openpilot.selfdrive.car.CarSpecs, dbc_dict: dict[str, str] = <factory>, flags: int = 0, platform_str: str | None = None)[source]
Bases:
FordPlatformConfig
- dbc_dict: dict[str, str]
- class selfdrive.car.ford.values.FordCarDocs(name: str, package: str = 'Co-Pilot360 Assist+', requirements: str | None = None, video_link: str | None = None, footnotes: list[enum.Enum] = <factory>, min_steer_speed: float | None = None, min_enable_speed: float | None = None, auto_resume: bool | None = None, car_parts: openpilot.selfdrive.car.docs_definitions.CarParts = <factory>, hybrid: bool = False, plug_in_hybrid: bool = False)[source]
Bases:
CarDocs
- hybrid: bool = False
- init_make(CP: <capnp.lib.capnp._StructModule object at 0x7f3309037850>)[source]
CarDocs subclasses can add make-specific logic for harness selection, footnotes, etc.
- package: str = 'Co-Pilot360 Assist+'
- plug_in_hybrid: bool = False
- class selfdrive.car.ford.values.FordFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
IntFlag
- CANFD = 1
- class selfdrive.car.ford.values.FordPlatformConfig(car_docs: list[openpilot.selfdrive.car.docs_definitions.CarDocs], specs: openpilot.selfdrive.car.CarSpecs, dbc_dict: dict[str, str] = <factory>, flags: int = 0, platform_str: str | None = None)[source]
Bases:
PlatformConfig
- dbc_dict: dict[str, str]