|
|
|
@ -21,7 +21,6 @@ from openpilot.selfdrive.selfdrived.state import StateMachine |
|
|
|
|
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 @@ class SelfdriveD: |
|
|
|
|
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 @@ class SelfdriveD: |
|
|
|
|
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) |
|
|
|
|