mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-26 11:52:07 +08:00
UI: fix getting stuck after vipc recv timeout
old-commit-hash: 86beb9a81a
This commit is contained in:
@@ -252,17 +252,19 @@ void CameraViewWidget::updateFrame() {
|
||||
resizeGL(width(), height());
|
||||
}
|
||||
|
||||
VisionBuf *buf = nullptr;
|
||||
if (vipc_client->connected) {
|
||||
VisionBuf *buf = vipc_client->recv();
|
||||
buf = vipc_client->recv();
|
||||
if (buf != nullptr) {
|
||||
latest_frame = buf;
|
||||
update();
|
||||
emit frameUpdated();
|
||||
} else if (!Hardware::PC()) {
|
||||
} else {
|
||||
LOGE("visionIPC receive timeout");
|
||||
}
|
||||
} else {
|
||||
// try to connect again quickly
|
||||
}
|
||||
if (buf == nullptr) {
|
||||
// try to connect or recv again
|
||||
QTimer::singleShot(1000. / UI_FREQ, this, &CameraViewWidget::updateFrame);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user