mirror of https://github.com/commaai/openpilot.git
* Reapply "Ford: detect missing LKAS from EPS configuration (#31821)"
This reverts commit 79247ab507d239c2e80bc0ecbf08e654af0c0c5b.
* catch
* now fix
* clean up
old-commit-hash: 7a6818da7e
This commit is contained in:
parent
04a7ae120c
commit
0aae777597
|
@ -39,6 +39,18 @@ class CarInterface(CarInterfaceBase):
|
|||
|
||||
if ret.flags & FordFlags.CANFD:
|
||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_FORD_CANFD
|
||||
else:
|
||||
# Lock out if the car does not have needed lateral and longitudinal control APIs.
|
||||
# Note that we also check CAN for adaptive cruise, but no known signal for LCA exists
|
||||
pscm_config = next((fw for fw in car_fw if fw.ecu == Ecu.eps and b'\x22\xDE\x01' in fw.request), None)
|
||||
if pscm_config:
|
||||
if len(pscm_config.fwVersion) != 24:
|
||||
ret.dashcamOnly = True
|
||||
else:
|
||||
config_tja = pscm_config.fwVersion[7] # Traffic Jam Assist
|
||||
config_lca = pscm_config.fwVersion[8] # Lane Centering Assist
|
||||
if config_tja != 0xFF or config_lca != 0xFF:
|
||||
ret.dashcamOnly = True
|
||||
|
||||
# Auto Transmission: 0x732 ECU or Gear_Shift_by_Wire_FD1
|
||||
found_ecus = [fw.ecu for fw in car_fw]
|
||||
|
|
Loading…
Reference in New Issue