Skip to content

Commit

Permalink
Ford: set radar delay (#1416)
Browse files Browse the repository at this point in the history
* set delay

* some tolerance

* better wording

* back
  • Loading branch information
sshane authored Oct 24, 2024
1 parent 606c035 commit 5aaad51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion opendbc/car/ford/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from opendbc.car import get_safety_config, structs
from opendbc.car.common.conversions import Conversions as CV
from opendbc.car.ford.fordcan import CanBus
from opendbc.car.ford.values import Ecu, FordFlags
from opendbc.car.ford.values import DBC, Ecu, FordFlags, RADAR
from opendbc.car.interfaces import CarInterfaceBase

TransmissionType = structs.CarParams.TransmissionType
Expand All @@ -19,6 +19,11 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime
ret.steerActuatorDelay = 0.2
ret.steerLimitTimer = 1.0

if DBC[candidate]['radar'] == RADAR.DELPHI_MRR:
# average of 33.3 Hz radar timestep / 4 scan modes = 60 ms
# MRR_Header_Timestamps->CAN_DET_TIME_SINCE_MEAS reports 61.3 ms
ret.radarDelay = 0.06

CAN = CanBus(fingerprint=fingerprint)
cfgs = [get_safety_config(structs.CarParams.SafetyModel.ford)]
if CAN.main >= 4:
Expand Down

0 comments on commit 5aaad51

Please sign in to comment.