modeld: use any available stream as main, if there's only one (#28514)

* Use whatever stream is available as main, if there's only one

* Move logw somewhere else

* Add wideRoadCameraState to ignore_alive if its not available
old-commit-hash: 4eb3d541492f7695227f4d8a83127cbd0d32ff79
This commit is contained in:
Kacper Rączy
2023-06-13 05:13:56 +02:00
committed by GitHub
parent 7855571bf4
commit 8aa845a1c8
2 changed files with 5 additions and 1 deletions

View File

@@ -440,6 +440,8 @@ class Controls:
available_streams = VisionIpcClient.available_streams("camerad", block=False)
if VisionStreamType.VISION_STREAM_ROAD not in available_streams:
self.sm.ignore_alive.append('roadCameraState')
if VisionStreamType.VISION_STREAM_WIDE_ROAD not in available_streams:
self.sm.ignore_alive.append('wideRoadCameraState')
if not self.read_only:
self.CI.init(self.CP, self.can_sock, self.pm.sock['sendcan'])