fix the always sm::update hack

pull/34892/head
Trey Moen 1 month ago
parent ce70223a37
commit 73365d7851
  1. 7
      selfdrive/ui/qt/onroad/annotated_camera.cc

@ -91,9 +91,14 @@ mat4 AnnotatedCameraWidget::calcFrameMatrix() {
void AnnotatedCameraWidget::paintGL() {
UIState *s = uiState();
SubMaster &sm = *(s->sm);
sm.update();
const double start_draw_t = millis_since_boot();
// if we haven't received all messages at least once, force an update of latest state
// many messages are required for UI draw and this will fail if any are not valid
if (!sm.allValid()) {
sm.update();
}
// draw camera frame
{
std::lock_guard lk(frame_lock);

Loading…
Cancel
Save