cameraview.cc: prev_frame_id static -> class member

old-commit-hash: af7d3c115a4780ad734c3f3a8d0084dd506aefec
This commit is contained in:
Willem Melching
2022-06-30 14:22:55 +02:00
parent 1fc567d40b
commit bfcd08324c
2 changed files with 4 additions and 4 deletions
+3 -4
View File
@@ -243,13 +243,12 @@ void CameraViewWidget::paintGL() {
// }
// Log duplicate/dropped frames
static int prev_id = 0;
if (frames[frame_idx].first == prev_id) {
if (frames[frame_idx].first == prev_frame_id) {
qInfo() << "Drawing same frame twice" << frames[frame_idx].first;
} else if (frames[frame_idx].first != prev_id + 1) {
} else if (frames[frame_idx].first != prev_frame_id + 1) {
qInfo() << "Skipped frame" << frames[frame_idx].first;
}
prev_id = frames[frame_idx].first;
prev_frame_id = frames[frame_idx].first;
glViewport(0, 0, width(), height());
glBindVertexArray(frame_vao);
+1
View File
@@ -78,6 +78,7 @@ protected:
std::deque<std::pair<uint32_t, VisionBuf*>> frames;
uint32_t draw_frame_id = 0;
int prev_frame_id = 0;
protected slots:
void vipcConnected(VisionIpcClient *vipc_client);