selfdrived: remove redundant sound card check (#33767)

rm
This commit is contained in:
Adeeb Shihadeh
2024-10-11 09:30:53 -07:00
committed by GitHub
parent 21a8f9e9ba
commit 7150c145ae
6 changed files with 2 additions and 25 deletions
-4
View File
@@ -41,10 +41,6 @@ class HardwareBase(ABC):
def get_device_type(self):
pass
@abstractmethod
def get_sound_card_online(self):
pass
@abstractmethod
def get_imei(self, slot) -> str:
pass
-3
View File
@@ -14,9 +14,6 @@ class Pc(HardwareBase):
def get_device_type(self):
return "pc"
def get_sound_card_online(self):
return True
def reboot(self, reason=None):
print("REBOOT!")
-6
View File
@@ -123,12 +123,6 @@ class Tici(HardwareBase):
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"])