Deprecate radarTimeStep (#1407)

* not used

* more
This commit is contained in:
Shane Smiskol 2024-10-23 16:14:24 -05:00 committed by GitHub
parent 84970d2c74
commit 52d0b51563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 3 additions and 11 deletions

View File

@ -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
}

View File

@ -2,7 +2,7 @@ from panda import Panda
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 @@ class CarInterface(CarInterfaceBase):
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

View File

@ -138,7 +138,6 @@ class CarInterface(CarInterfaceBase):
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:

View File

@ -40,7 +40,6 @@ class RadarInterface(RadarInterfaceBase):
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:

View File

@ -18,7 +18,6 @@ class RadarInterface(RadarInterfaceBase):
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:

View File

@ -259,12 +259,11 @@ class RadarInterfaceBase(ABC):
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

View File

@ -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))