ui: stop vipc thread before the DriverViewWindow is hidden (#26738)

pull/26775/head
Dean Lee 2 years ago committed by GitHub
parent 151e0d8c39
commit b1009c7f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/ui/qt/offroad/driverview.cc
  2. 2
      selfdrive/ui/qt/widgets/cameraview.h

@ -22,6 +22,7 @@ DriverViewWindow::DriverViewWindow(QWidget* parent) : QWidget(parent) {
}
void DriverViewWindow::mouseReleaseEvent(QMouseEvent* e) {
cameraView->stopVipcThread();
emit done();
}
@ -35,7 +36,6 @@ void DriverViewScene::showEvent(QShowEvent* event) {
}
void DriverViewScene::hideEvent(QHideEvent* event) {
// TODO: stop vipc thread ?
params.putBool("IsDriverViewEnabled", false);
}

@ -35,6 +35,7 @@ public:
void setFrameId(int frame_id) { draw_frame_id = frame_id; }
void setStreamType(VisionStreamType type) { requested_stream_type = type; }
VisionStreamType getStreamType() { return active_stream_type; }
void stopVipcThread();
signals:
void clicked();
@ -51,7 +52,6 @@ protected:
void updateCalibration(const mat3 &calib);
void vipcThread();
void clearFrames();
void stopVipcThread();
bool zoomed_view;
GLuint frame_vao, frame_vbo, frame_ibo;

Loading…
Cancel
Save