rename carState.radarOffCan to radarUnavailable (#27187)

* rename carState.radarOffCan to radarUnavailable

* bump cereal
old-commit-hash: 6fa9b555a4
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent 57dc8534b5
commit 20fbb0a8fd
  1. 2
      cereal
  2. 2
      selfdrive/car/body/interface.py
  3. 2
      selfdrive/car/chrysler/interface.py
  4. 2
      selfdrive/car/ford/interface.py
  5. 2
      selfdrive/car/gm/carcontroller.py
  6. 4
      selfdrive/car/gm/interface.py
  7. 2
      selfdrive/car/gm/radar_interface.py
  8. 2
      selfdrive/car/honda/interface.py
  9. 2
      selfdrive/car/honda/radar_interface.py
  10. 2
      selfdrive/car/hyundai/interface.py
  11. 2
      selfdrive/car/hyundai/radar_interface.py
  12. 2
      selfdrive/car/mazda/interface.py
  13. 2
      selfdrive/car/nissan/interface.py
  14. 2
      selfdrive/car/subaru/interface.py
  15. 2
      selfdrive/car/tests/test_car_interfaces.py
  16. 2
      selfdrive/car/volkswagen/interface.py
  17. 2
      selfdrive/test/process_replay/process_replay.py

@ -1 +1 @@
Subproject commit b27131e72f987f3bd0fcd28a42f686b583709e1f
Subproject commit bdbac40160a550c88e481a3bf700a1016901bd9b

@ -24,7 +24,7 @@ class CarInterface(CarInterfaceBase):
ret.wheelSpeedFactor = SPEED_FROM_RPM
ret.centerToFront = ret.wheelbase * 0.44
ret.radarOffCan = True
ret.radarUnavailable = True
ret.openpilotLongitudinalControl = True
ret.steerControlType = car.CarParams.SteerControlType.angle

@ -12,7 +12,7 @@ class CarInterface(CarInterfaceBase):
ret.carName = "chrysler"
ret.dashcamOnly = candidate in RAM_HD
ret.radarOffCan = DBC[candidate]['radar'] is None
ret.radarUnavailable = DBC[candidate]['radar'] is None
ret.steerActuatorDelay = 0.1
ret.steerLimitTimer = 0.4

@ -18,7 +18,7 @@ class CarInterface(CarInterfaceBase):
# These cars are dashcam only until the port is finished
ret.dashcamOnly = True
ret.radarOffCan = True
ret.radarUnavailable = True
ret.steerControlType = car.CarParams.SteerControlType.angle
ret.steerActuatorDelay = 0.2
ret.steerLimitTimer = 1.0

@ -114,7 +114,7 @@ class CarController:
# Radar needs to know current speed and yaw rate (50hz),
# and that ADAS is alive (10hz)
if not self.CP.radarOffCan:
if not self.CP.radarUnavailable:
tt = self.frame * DT_CTRL
time_and_headlights_step = 10
if self.frame % time_and_headlights_step == 0:

@ -63,7 +63,7 @@ class CarInterface(CarInterfaceBase):
if candidate in CAMERA_ACC_CAR:
ret.experimentalLongitudinalAvailable = True
ret.networkLocation = NetworkLocation.fwdCamera
ret.radarOffCan = True # no radar
ret.radarUnavailable = True # no radar
ret.pcmCruise = True
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM
ret.minEnableSpeed = 5 * CV.KPH_TO_MS
@ -85,7 +85,7 @@ class CarInterface(CarInterfaceBase):
else: # ASCM, OBD-II harness
ret.openpilotLongitudinalControl = True
ret.networkLocation = NetworkLocation.gateway
ret.radarOffCan = False
ret.radarUnavailable = False
ret.pcmCruise = False # stock non-adaptive cruise control is kept off
# supports stop and go, but initial engage must (conservatively) be above 18mph
ret.minEnableSpeed = 18 * CV.MPH_TO_MS

@ -36,7 +36,7 @@ class RadarInterface(RadarInterfaceBase):
def __init__(self, CP):
super().__init__(CP)
self.rcp = None if CP.radarOffCan else create_radar_can_parser(CP.carFingerprint)
self.rcp = None if CP.radarUnavailable else create_radar_can_parser(CP.carFingerprint)
self.trigger_msg = LAST_RADAR_MSG
self.updated_messages = set()

@ -34,7 +34,7 @@ class CarInterface(CarInterfaceBase):
if candidate in HONDA_BOSCH:
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.hondaBosch)]
ret.radarOffCan = True
ret.radarUnavailable = True
if candidate not in HONDA_BOSCH_RADARLESS:
# Disable the radar and let openpilot control longitudinal

@ -21,7 +21,7 @@ class RadarInterface(RadarInterfaceBase):
self.track_id = 0
self.radar_fault = False
self.radar_wrong_config = False
self.radar_off_can = CP.radarOffCan
self.radar_off_can = CP.radarUnavailable
self.radar_ts = CP.radarTimeStep
self.delay = int(round(0.1 / CP.radarTimeStep)) # 0.1s delay of radar

@ -20,7 +20,7 @@ class CarInterface(CarInterfaceBase):
@staticmethod
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long):
ret.carName = "hyundai"
ret.radarOffCan = RADAR_START_ADDR not in fingerprint[1] or DBC[ret.carFingerprint]["radar"] is None
ret.radarUnavailable = RADAR_START_ADDR not in fingerprint[1] or DBC[ret.carFingerprint]["radar"] is None
# These cars have been put into dashcam only due to both a lack of users and test coverage.
# These cars likely still work fine. Once a user confirms each car works and a test route is

@ -37,7 +37,7 @@ class RadarInterface(RadarInterfaceBase):
self.trigger_msg = RADAR_START_ADDR + RADAR_MSG_COUNT - 1
self.track_id = 0
self.radar_off_can = CP.radarOffCan
self.radar_off_can = CP.radarUnavailable
self.rcp = get_radar_can_parser(CP)
def update(self, can_strings):

@ -14,7 +14,7 @@ class CarInterface(CarInterfaceBase):
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long):
ret.carName = "mazda"
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.mazda)]
ret.radarOffCan = True
ret.radarUnavailable = True
ret.dashcamOnly = candidate not in (CAR.CX5_2022, CAR.CX9_2021)

@ -19,7 +19,7 @@ class CarInterface(CarInterfaceBase):
ret.steerRatio = 17
ret.steerControlType = car.CarParams.SteerControlType.angle
ret.radarOffCan = True
ret.radarUnavailable = True
if candidate in (CAR.ROGUE, CAR.XTRAIL):
ret.mass = 1610 + STD_CARGO_KG

@ -11,7 +11,7 @@ class CarInterface(CarInterfaceBase):
@staticmethod
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long):
ret.carName = "subaru"
ret.radarOffCan = True
ret.radarUnavailable = True
ret.dashcamOnly = candidate in PREGLOBAL_CARS
ret.autoResumeSng = False

@ -76,7 +76,7 @@ class TestCarInterfaces(unittest.TestCase):
# Run radar interface once
radar_interface.update([])
if not car_params.radarOffCan and radar_interface.rcp is not None and \
if not car_params.radarUnavailable and radar_interface.rcp is not None and \
hasattr(radar_interface, '_update') and hasattr(radar_interface, 'trigger_msg'):
radar_interface._update([radar_interface.trigger_msg])

@ -23,7 +23,7 @@ class CarInterface(CarInterfaceBase):
@staticmethod
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long):
ret.carName = "volkswagen"
ret.radarOffCan = True
ret.radarUnavailable = True
use_off_car_defaults = len(fingerprint[0]) == 0 # Pick sensible carParams during offline doc generation/CI jobs

@ -204,7 +204,7 @@ def controlsd_rcv_callback(msg, CP, cfg, fsm):
def radar_rcv_callback(msg, CP, cfg, fsm):
if msg.which() != "can":
return [], False
elif CP.radarOffCan:
elif CP.radarUnavailable:
return ["radarState", "liveTracks"], True
radar_msgs = {"honda": [0x445], "toyota": [0x19f, 0x22f], "gm": [0x474],

Loading…
Cancel
Save