mirror of https://github.com/commaai/openpilot.git
Ford: Add F-150 Lightning (#30692)
* Update interface.py
* Update values.py
* Update routes.py
* Update override.yaml
* Update values.py
* Update interface.py
* Update selfdrive/car/ford/interface.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2192cc170c
This commit is contained in:
parent
d1d54b5eab
commit
390e75b3bd
|
@ -14,7 +14,7 @@ class CarInterface(CarInterfaceBase):
|
|||
@staticmethod
|
||||
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
|
||||
ret.carName = "ford"
|
||||
ret.dashcamOnly = candidate in {CAR.F_150_MK14}
|
||||
ret.dashcamOnly = candidate in CANFD_CAR
|
||||
|
||||
ret.radarUnavailable = True
|
||||
ret.steerControlType = car.CarParams.SteerControlType.angle
|
||||
|
@ -56,6 +56,12 @@ class CarInterface(CarInterfaceBase):
|
|||
ret.steerRatio = 17.0
|
||||
ret.mass = 2000
|
||||
|
||||
elif candidate == CAR.F_150_LIGHTNING_MK1:
|
||||
# required trim only on SuperCrew
|
||||
ret.wheelbase = 3.70
|
||||
ret.steerRatio = 16.9
|
||||
ret.mass = 2948
|
||||
|
||||
elif candidate == CAR.FOCUS_MK4:
|
||||
ret.wheelbase = 2.7
|
||||
ret.steerRatio = 15.0
|
||||
|
@ -94,7 +100,9 @@ class CarInterface(CarInterfaceBase):
|
|||
events = self.create_common_events(ret, extra_gears=[GearShifter.manumatic])
|
||||
if not self.CS.vehicle_sensors_valid:
|
||||
events.add(car.CarEvent.EventName.vehicleSensorsInvalid)
|
||||
if self.CS.hybrid_platform:
|
||||
|
||||
# Ford Q3 Hybrids are disabled due to occasional incorrect checksums some stock messages. This must be root caused before enabling support.
|
||||
if self.CS.hybrid_platform and self.CP.carFingerprint not in CANFD_CAR:
|
||||
events.add(car.CarEvent.EventName.startupNoControl)
|
||||
|
||||
ret.events = events.to_msg()
|
||||
|
|
|
@ -47,9 +47,10 @@ class CAR(StrEnum):
|
|||
F_150_MK14 = "FORD F-150 14TH GEN"
|
||||
FOCUS_MK4 = "FORD FOCUS 4TH GEN"
|
||||
MAVERICK_MK1 = "FORD MAVERICK 1ST GEN"
|
||||
F_150_LIGHTNING_MK1 = "FORD F-150 LIGHTNING 1ST GEN"
|
||||
|
||||
|
||||
CANFD_CAR = {CAR.F_150_MK14}
|
||||
CANFD_CAR = {CAR.F_150_MK14, CAR.F_150_LIGHTNING_MK1}
|
||||
|
||||
|
||||
class RADAR:
|
||||
|
@ -61,6 +62,7 @@ DBC: Dict[str, Dict[str, str]] = defaultdict(lambda: dbc_dict("ford_lincoln_base
|
|||
|
||||
# F-150 radar is not yet supported
|
||||
DBC[CAR.F_150_MK14] = dbc_dict("ford_lincoln_base_pt", None)
|
||||
DBC[CAR.F_150_LIGHTNING_MK1] = dbc_dict("ford_lincoln_base_pt", None)
|
||||
|
||||
|
||||
class Footnote(Enum):
|
||||
|
@ -94,6 +96,7 @@ CAR_INFO: Dict[str, Union[CarInfo, List[CarInfo]]] = {
|
|||
FordCarInfo("Lincoln Aviator 2020-21", "Co-Pilot360 Plus"),
|
||||
],
|
||||
CAR.F_150_MK14: FordCarInfo("Ford F-150 2023", "Co-Pilot360 Active 2.0"),
|
||||
CAR.F_150_LIGHTNING_MK1: FordCarInfo("Ford F-150 Lightning 2021-23", "Co-Pilot360 Active 2.0"),
|
||||
CAR.FOCUS_MK4: FordCarInfo("Ford Focus 2018", "Adaptive Cruise Control with Lane Centering", footnotes=[Footnote.FOCUS]),
|
||||
CAR.MAVERICK_MK1: [
|
||||
FordCarInfo("Ford Maverick 2022", "LARIAT Luxury"),
|
||||
|
@ -236,6 +239,20 @@ FW_VERSIONS = {
|
|||
(Ecu.engine, 0x7E0, None): [
|
||||
b'PL3A-14C204-BRB\x00\x00\x00\x00\x00\x00\x00\x00\x00',
|
||||
],
|
||||
},
|
||||
CAR.F_150_LIGHTNING_MK1: {
|
||||
(Ecu.abs, 0x760, None): [
|
||||
b'PL38-2D053-AA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
|
||||
],
|
||||
(Ecu.fwdCamera, 0x706, None): [
|
||||
b'ML3T-14H102-ABT\x00\x00\x00\x00\x00\x00\x00\x00\x00',
|
||||
],
|
||||
(Ecu.fwdRadar, 0x764, None): [
|
||||
b'ML3T-14D049-AL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
|
||||
],
|
||||
(Ecu.engine, 0x7E0, None): [
|
||||
b'NL3A-14C204-BAR\x00\x00\x00\x00\x00\x00\x00\x00\x00',
|
||||
],
|
||||
},
|
||||
CAR.FOCUS_MK4: {
|
||||
(Ecu.eps, 0x730, None): [
|
||||
|
|
|
@ -52,6 +52,7 @@ routes = [
|
|||
CarTestRoute("62241b0c7fea4589|2022-09-01--15-32-49", FORD.EXPLORER_MK6),
|
||||
CarTestRoute("e886087f430e7fe7|2023-06-16--23-06-36", FORD.FOCUS_MK4),
|
||||
CarTestRoute("bd37e43731e5964b|2023-04-30--10-42-26", FORD.MAVERICK_MK1),
|
||||
CarTestRoute("112e4d6e0cad05e1|2023-11-14--08-21-43", FORD.F_150_LIGHTNING_MK1),
|
||||
#TestRoute("f1b4c567731f4a1b|2018-04-30--10-15-35", FORD.FUSION),
|
||||
|
||||
CarTestRoute("7cc2a8365b4dd8a9|2018-12-02--12-10-44", GM.ACADIA),
|
||||
|
|
|
@ -26,6 +26,7 @@ FORD EXPLORER 6TH GEN: [.nan, 1.5, .nan]
|
|||
FORD F-150 14TH GEN: [.nan, 1.5, .nan]
|
||||
FORD FOCUS 4TH GEN: [.nan, 1.5, .nan]
|
||||
FORD MAVERICK 1ST GEN: [.nan, 1.5, .nan]
|
||||
FORD F-150 LIGHTNING 1ST GEN: [.nan, 1.5, .nan]
|
||||
###
|
||||
|
||||
# No steering wheel
|
||||
|
|
Loading…
Reference in New Issue