Skip to content

Commit cdfbc3b

Browse files
pd0wmspektor56
authored andcommitted
ui: disable sync with model until more stable (commaai#24984)
1 parent 2049a52 commit cdfbc3b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

selfdrive/ui/qt/widgets/cameraview.cc

+14-4
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,21 @@ void CameraViewWidget::paintGL() {
220220

221221
if (frames.empty()) return;
222222

223-
int frame_idx;
224-
for (frame_idx = 0; frame_idx < frames.size() - 1; frame_idx++) {
225-
if (frames[frame_idx].first == draw_frame_id) break;
223+
int frame_idx = frames.size() - 1;
224+
225+
// Always draw latest frame until sync logic is more stable
226+
// for (frame_idx = 0; frame_idx < frames.size() - 1; frame_idx++) {
227+
// if (frames[frame_idx].first == draw_frame_id) break;
228+
// }
229+
230+
// Log duplicate/dropped frames
231+
static int prev_id = 0;
232+
if (frames[frame_idx].first == prev_id) {
233+
qInfo() << "Drawing same frame twice" << frames[frame_idx].first;
234+
} else if (frames[frame_idx].first != prev_id + 1) {
235+
qInfo() << "Skipped frame" << frames[frame_idx].first;
226236
}
227-
VisionBuf *frame = frames[frame_idx].second;
237+
prev_id = frames[frame_idx].first;
228238

229239
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
230240
glViewport(0, 0, width(), height());

0 commit comments

Comments
 (0)