From 06b974512af7e5d5a0bead72f3c4ebe32f9d1815 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 19 Jan 2021 12:43:39 +0100 Subject: [PATCH] start timer only after ui init --- selfdrive/ui/qt/home.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index aeaec7b443..4b969c4d42 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -192,7 +192,6 @@ static void set_backlight(int brightness) { GLWindow::GLWindow(QWidget* parent) : QOpenGLWidget(parent) { timer = new QTimer(this); - timer->start(1000 / UI_FREQ); QObject::connect(timer, SIGNAL(timeout()), this, SLOT(timerUpdate())); backlight_timer = new QTimer(this); @@ -224,6 +223,7 @@ void GLWindow::initializeGL() { wake(); + timer->start(1000 / UI_FREQ); backlight_timer->start(BACKLIGHT_DT * 1000); }