Skip to content

Commit

Permalink
fix visualizer widget timer
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Oct 29, 2024
1 parent 8b6bf1d commit 1aa39a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/qt/debugger/visualizerdisplaywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ VisualizerDisplayWidget::VisualizerDisplayWidget(QWidget *parent) : QWidget{pare

setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, &VisualizerDisplayWidget::customContextMenuRequested, this, &VisualizerDisplayWidget::contextMenu);
connect(m_refreshTimer, &QTimer::timeout, this, &VisualizerDisplayWidget::draw);

m_image = new QImage(LCD_WIDTH, LCD_HEIGHT, QImage::Format_RGB32);
}
Expand Down Expand Up @@ -93,7 +94,6 @@ void VisualizerDisplayWidget::setRefreshRate(int rate) {
if (!rate) {
return;
}
connect(m_refreshTimer, SIGNAL(timeout()), this, SLOT(draw()));
m_refreshTimer->stop();
m_refreshTimer->setInterval(1000 / rate);
m_refreshTimer->setTimerType(Qt::PreciseTimer);
Expand Down

0 comments on commit 1aa39a3

Please sign in to comment.