From 03e6c81821eddfdb80d3ed29e86e950d9cd0f296 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 16 Aug 2026 16:10:35 -0700 Subject: [PATCH] test_onroad: more precise frame ID check (#38647) --- openpilot/selfdrive/test/test_onroad.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpilot/selfdrive/test/test_onroad.py b/openpilot/selfdrive/test/test_onroad.py index 4426c196d4..f524046abe 100755 --- a/openpilot/selfdrive/test/test_onroad.py +++ b/openpilot/selfdrive/test/test_onroad.py @@ -335,13 +335,14 @@ class TestOnroad(OpenpilotTestCase): assert np.all(eof_sof_diff > 0) assert np.all(eof_sof_diff < 50*1e6) - # TODO: loggerd doesn't start fast enough to be ready before the first frames come out first_fid = {min(self.ts[c]['frameId']) for c in cams} - #assert len(first_fid) == 1, "Cameras don't start on same frame ID" if cams[0].endswith('CameraState'): # camerad guarantees that all cams start on frame ID 0 # (note loggerd also needs to start up fast enough to catch it) assert min(first_fid) < 100, "Cameras start on frame ID too high" + else: + # encoderd synchronizes all camera encoders to the same starting frame + assert len(first_fid) == 1, "Camera encoders don't start on same frame ID" # we don't do a full segment rotation, so these might not match exactly last_fid = {max(self.ts[c]['frameId']) for c in cams}