diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index 9f2036e1cb..4e8ce829e8 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -206,6 +206,7 @@ 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 a47cc70e7f..316838aa5d 100755 --- a/opendbc/car/honda/radar_interface.py +++ b/opendbc/car/honda/radar_interface.py @@ -20,8 +20,6 @@ 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 64b648f1cf..92147da514 100644 --- a/opendbc/car/interfaces.py +++ b/opendbc/car/interfaces.py @@ -260,7 +260,6 @@ 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 c375468353..a9777312ca 100644 --- a/opendbc/car/structs.py +++ b/opendbc/car/structs.py @@ -385,6 +385,7 @@ 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)