mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-17 14:03:51 +08:00
test_onroad: more precise frame ID check (#38647)
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user