mirror of https://github.com/commaai/cereal.git
Merge remote-tracking branch 'origin/master' into radar-parse-completed
This commit is contained in:
commit
2983f45149
|
@ -4,12 +4,14 @@ repos:
|
|||
hooks:
|
||||
- id: check-ast
|
||||
- id: check-yaml
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-shebang-scripts-are-executable
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.5.1
|
||||
hooks:
|
||||
- id: mypy
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.0.285
|
||||
rev: v0.0.287
|
||||
hooks:
|
||||
- id: ruff
|
||||
- repo: local
|
||||
|
|
|
@ -287,8 +287,7 @@ class PubMaster:
|
|||
dat = dat.to_bytes()
|
||||
self.sock[s].send(dat)
|
||||
|
||||
def wait_for_readers_to_update(self, s: str, timeout: int) -> bool:
|
||||
dt = 0.05
|
||||
def wait_for_readers_to_update(self, s: str, timeout: int, dt: float = 0.05) -> bool:
|
||||
for _ in range(int(timeout*(1./dt))):
|
||||
if self.sock[s].all_readers_updated():
|
||||
return True
|
||||
|
|
|
@ -33,7 +33,7 @@ class TestVisionIpc(unittest.TestCase):
|
|||
self.assertTrue(self.client.is_connected)
|
||||
|
||||
def test_available_streams(self):
|
||||
for k in range(0, 4):
|
||||
for k in range(4):
|
||||
stream_types = set(random.choices([x.value for x in VisionStreamType], k=k))
|
||||
self.setup_vipc("camerad", *stream_types)
|
||||
available_streams = VisionIpcClient.available_streams("camerad", True)
|
||||
|
|
Loading…
Reference in New Issue