diff --git a/opendbc/car/car.capnp b/opendbc/car/car.capnp index f2a8974d15..237ba2c26b 100644 --- a/opendbc/car/car.capnp +++ b/opendbc/car/car.capnp @@ -508,7 +508,6 @@ struct CarParams { transmissionType @43 :TransmissionType; carFw @44 :List(CarFw); - radarTimeStep @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard radarDelay @74 :Float32; fingerprintSource @49: FingerprintSource; networkLocation @50 :NetworkLocation; # Where Panda/C2 is integrated into the car's CAN network @@ -719,4 +718,5 @@ struct CarParams { maxSteeringAngleDegDEPRECATED @54 :Float32; longitudinalActuatorDelayLowerBoundDEPRECATED @61 :Float32; stoppingControlDEPRECATED @31 :Bool; # Does the car allow full control even at lows speeds when stopping + radarTimeStepDEPRECATED @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard } diff --git a/opendbc/car/ford/interface.py b/opendbc/car/ford/interface.py index 59c6186baf..fbd027a2dc 100644 --- a/opendbc/car/ford/interface.py +++ b/opendbc/car/ford/interface.py @@ -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 DBC, Ecu, FordFlags, RADAR +from opendbc.car.ford.values import Ecu, FordFlags from opendbc.car.interfaces import CarInterfaceBase TransmissionType = structs.CarParams.TransmissionType @@ -15,9 +15,6 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.dashcamOnly = bool(ret.flags & FordFlags.CANFD) ret.radarUnavailable = True - if DBC[candidate]['radar'] == RADAR.DELPHI_MRR: - ret.radarTimeStep = 0.03 # 33.3 Hz - ret.steerControlType = structs.CarParams.SteerControlType.angle ret.steerActuatorDelay = 0.2 ret.steerLimitTimer = 1.0 diff --git a/opendbc/car/gm/interface.py b/opendbc/car/gm/interface.py index 767909bd95..f3953c0eb9 100755 --- a/opendbc/car/gm/interface.py +++ b/opendbc/car/gm/interface.py @@ -138,7 +138,6 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.steerActuatorDelay = 0.1 # Default delay, not measured yet ret.steerLimitTimer = 0.4 - ret.radarTimeStep = 0.0667 # GM radar runs at 15Hz instead of standard 20Hz ret.longitudinalActuatorDelay = 0.5 # large delay to initially start braking if candidate == CAR.CHEVROLET_VOLT: diff --git a/opendbc/car/gm/radar_interface.py b/opendbc/car/gm/radar_interface.py index 78f6a89a94..e79d26533b 100755 --- a/opendbc/car/gm/radar_interface.py +++ b/opendbc/car/gm/radar_interface.py @@ -40,7 +40,6 @@ def __init__(self, CP): self.trigger_msg = LAST_RADAR_MSG self.updated_messages = set() - self.radar_ts = CP.radarTimeStep def update(self, can_strings): if self.rcp is None: diff --git a/opendbc/car/honda/radar_interface.py b/opendbc/car/honda/radar_interface.py index 316838aa5d..97c6664d0e 100755 --- a/opendbc/car/honda/radar_interface.py +++ b/opendbc/car/honda/radar_interface.py @@ -18,7 +18,6 @@ def __init__(self, CP): self.radar_fault = False self.radar_wrong_config = False self.radar_off_can = CP.radarUnavailable - self.radar_ts = CP.radarTimeStep # Nidec if self.radar_off_can: diff --git a/opendbc/car/interfaces.py b/opendbc/car/interfaces.py index c704f12f4a..f5644a5cff 100644 --- a/opendbc/car/interfaces.py +++ b/opendbc/car/interfaces.py @@ -259,12 +259,11 @@ def __init__(self, CP: structs.CarParams): self.CP = CP self.rcp = None self.pts: dict[int, structs.RadarData.RadarPoint] = {} - self.radar_ts = CP.radarTimeStep self.frame = 0 def update(self, can_packets: list[tuple[int, list[CanData]]]) -> structs.RadarDataT | None: self.frame += 1 - if (self.frame % int(100 * self.radar_ts)) == 0: + if (self.frame % 5) == 0: # 20 Hz is very standard return structs.RadarData() return None diff --git a/opendbc/car/toyota/radar_interface.py b/opendbc/car/toyota/radar_interface.py index 922dbac278..bfb2df0494 100755 --- a/opendbc/car/toyota/radar_interface.py +++ b/opendbc/car/toyota/radar_interface.py @@ -23,7 +23,6 @@ class RadarInterface(RadarInterfaceBase): def __init__(self, CP): super().__init__(CP) self.track_id = 0 - self.radar_ts = CP.radarTimeStep if CP.carFingerprint in TSS2_CAR: self.RADAR_A_MSGS = list(range(0x180, 0x190))