test_onroad: more precise frame ID check (#38647)

This commit is contained in:
Adeeb Shihadeh
2026-08-16 16:10:35 -07:00
committed by GitHub
parent 047be14df9
commit 03e6c81821
+3 -2
View File
@@ -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}