mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-03-02 09:03:53 +08:00
start timer only after ui init
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user