diff --git a/cereal/log.capnp b/cereal/log.capnp index c35219b3acdeec..0a3673208e1223 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -80,7 +80,6 @@ struct OnroadEvent @0xc4fa6047f024e718 { commIssueAvgFreq @44; tooDistracted @45; posenetInvalid @46; - soundsUnavailable @47; preLaneChangeLeft @48; preLaneChangeRight @49; laneChange @50; @@ -126,6 +125,8 @@ struct OnroadEvent @0xc4fa6047f024e718 { espActive @90; personalityChanged @91; aeb @92; + + soundsUnavailableDEPRECATED @47; } } diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index 7be514e350afbc..cdc23e53c93d9e 100755 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -724,11 +724,6 @@ def personality_changed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=600.) }, - EventName.soundsUnavailable: { - ET.PERMANENT: NormalPermanentAlert("Speaker not found", "Reboot your Device"), - ET.NO_ENTRY: NoEntryAlert("Speaker not found"), - }, - EventName.tooDistracted: { ET.NO_ENTRY: NoEntryAlert("Distraction Level Too High"), }, diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index 8b7575d35d56d3..0aeff3a1169172 100755 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -21,7 +21,6 @@ from openpilot.selfdrive.selfdrived.alertmanager import AlertManager, set_offroad_alert from openpilot.selfdrive.controls.lib.latcontrol import MIN_LATERAL_CONTROL_SPEED -from openpilot.system.hardware import HARDWARE from openpilot.system.version import get_build_metadata REPLAY = "REPLAY" in os.environ @@ -88,9 +87,6 @@ def __init__(self, CP=None): self.is_metric = self.params.get_bool("IsMetric") self.is_ldw_enabled = self.params.get_bool("IsLdwEnabled") - # detect sound card presence and ensure successful init - sounds_available = HARDWARE.get_sound_card_online() - car_recognized = self.CP.carName != 'mock' # cleanup old params @@ -129,8 +125,6 @@ def __init__(self, CP=None): elif self.CP.secOcRequired and not self.CP.secOcKeyAvailable: self.startup_event = EventName.startupNoSecOcKey - if not sounds_available: - self.events.add(EventName.soundsUnavailable, static=True) if not car_recognized: self.events.add(EventName.carUnrecognized, static=True) set_offroad_alert("Offroad_CarUnrecognized", True) diff --git a/system/hardware/base.py b/system/hardware/base.py index 6cdb4a4d64e676..620f2c71b8b9d2 100644 --- a/system/hardware/base.py +++ b/system/hardware/base.py @@ -41,10 +41,6 @@ def get_os_version(self): def get_device_type(self): pass - @abstractmethod - def get_sound_card_online(self): - pass - @abstractmethod def get_imei(self, slot) -> str: pass diff --git a/system/hardware/pc/hardware.py b/system/hardware/pc/hardware.py index 719e272aea1639..a2cbafeae8b811 100644 --- a/system/hardware/pc/hardware.py +++ b/system/hardware/pc/hardware.py @@ -14,9 +14,6 @@ def get_os_version(self): def get_device_type(self): return "pc" - def get_sound_card_online(self): - return True - def reboot(self, reason=None): print("REBOOT!") diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index 03e973fd1a9288..70049d1849414f 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -123,12 +123,6 @@ def get_os_version(self): def get_device_type(self): return get_device_type() - def get_sound_card_online(self): - if os.path.isfile('/proc/asound/card0/state'): - with open('/proc/asound/card0/state') as f: - return f.read().strip() == 'ONLINE' - return False - def reboot(self, reason=None): subprocess.check_output(["sudo", "reboot"])