diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index e54d804280..a13fb67db8 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -207,7 +207,6 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.steerActuatorDelay = 0.1 ret.steerLimitTimer = 0.8 - ret.radarDelay = 0.1 return ret diff --git a/opendbc/car/honda/radar_interface.py b/opendbc/car/honda/radar_interface.py index 316838aa5d..a47cc70e7f 100755 --- a/opendbc/car/honda/radar_interface.py +++ b/opendbc/car/honda/radar_interface.py @@ -20,6 +20,8 @@ def __init__(self, CP): self.radar_off_can = CP.radarUnavailable self.radar_ts = CP.radarTimeStep + self.delay = int(round(0.1 / CP.radarTimeStep)) # 0.1s delay of radar + # Nidec if self.radar_off_can: self.rcp = None diff --git a/opendbc/car/interfaces.py b/opendbc/car/interfaces.py index 39819e511c..2f0a47909f 100644 --- a/opendbc/car/interfaces.py +++ b/opendbc/car/interfaces.py @@ -261,6 +261,7 @@ def __init__(self, CP: structs.CarParams): self.CP = CP self.rcp = None self.pts: dict[int, structs.RadarData.RadarPoint] = {} + self.delay = 0 self.radar_ts = CP.radarTimeStep self.frame = 0 diff --git a/opendbc/car/structs.py b/opendbc/car/structs.py index 425b60c620..bba40251ad 100644 --- a/opendbc/car/structs.py +++ b/opendbc/car/structs.py @@ -390,7 +390,6 @@ class LateralTorqueTuning: carFw: list['CarParams.CarFw'] = auto_field() radarTimeStep: float = 0.05 # time delta between radar updates, 20Hz is very standard - radarDelay: float = auto_field() fingerprintSource: 'CarParams.FingerprintSource' = field(default_factory=lambda: CarParams.FingerprintSource.can) # Where Panda/C2 is integrated into the car's CAN network networkLocation: 'CarParams.NetworkLocation' = field(default_factory=lambda: CarParams.NetworkLocation.fwdCamera)