Skip to content

Commit 4b72aae

Browse files
authored
Ford CAN FD: SecOC is dashcam (#1908)
* no tron (2010) * switch to actual ACC message * switch to camera * add logging
1 parent df48fc9 commit 4b72aae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

opendbc/car/ford/interface.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22
from opendbc.car import Bus, get_safety_config, structs
3+
from opendbc.car.carlog import carlog
34
from opendbc.car.common.conversions import Conversions as CV
45
from opendbc.car.ford.fordcan import CanBus
56
from opendbc.car.ford.values import CarControllerParams, DBC, Ecu, FordFlags, RADAR, FordSafetyFlags
@@ -47,17 +48,25 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime
4748

4849
if ret.flags & FordFlags.CANFD:
4950
ret.safetyConfigs[-1].safetyParam |= FordSafetyFlags.CANFD.value
51+
52+
# TRON (SecOC) platforms are not supported
53+
# LateralMotionControl2, ACCDATA are 16 bytes on these platforms
54+
if fingerprint[CAN.camera].get(0x3d6) != 8 or fingerprint[CAN.camera].get(0x186) != 8:
55+
carlog.error('dashcamOnly: SecOC is unsupported')
56+
ret.dashcamOnly = True
5057
else:
5158
# Lock out if the car does not have needed lateral and longitudinal control APIs.
5259
# Note that we also check CAN for adaptive cruise, but no known signal for LCA exists
5360
pscm_config = next((fw for fw in car_fw if fw.ecu == Ecu.eps and b'\x22\xDE\x01' in fw.request), None)
5461
if pscm_config:
5562
if len(pscm_config.fwVersion) != 24:
63+
carlog.error('dashcamOnly: Invalid EPS FW version')
5664
ret.dashcamOnly = True
5765
else:
5866
config_tja = pscm_config.fwVersion[7] # Traffic Jam Assist
5967
config_lca = pscm_config.fwVersion[8] # Lane Centering Assist
6068
if config_tja != 0xFF or config_lca != 0xFF:
69+
carlog.error('dashcamOnly: Car lacks required lateral control APIs')
6170
ret.dashcamOnly = True
6271

6372
# Auto Transmission: 0x732 ECU or Gear_Shift_by_Wire_FD1

0 commit comments

Comments
 (0)