mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 13:51:47 -05:00
Use a master timer in the main window to trigger main spectrum instead of spectrum internal timer used by default
This commit is contained in:
parent
a28d917531
commit
e6caa94593
@ -58,6 +58,7 @@ public:
|
||||
|
||||
Real getWaterfallShare() const { return m_waterfallShare; }
|
||||
void setWaterfallShare(Real waterfallShare);
|
||||
void connectTimer(const QTimer& timer);
|
||||
|
||||
private:
|
||||
struct ChannelMarkerState {
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
void removeChannelMarker(ChannelMarker* channelMarker);
|
||||
|
||||
void setInputGUI(QWidget* gui);
|
||||
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||
|
||||
private:
|
||||
enum {
|
||||
@ -81,6 +82,7 @@ private:
|
||||
|
||||
DSPEngine* m_dspEngine;
|
||||
|
||||
QTimer m_masterTimer;
|
||||
QTimer m_statusTimer;
|
||||
int m_lastEngineState;
|
||||
|
||||
|
@ -1543,3 +1543,9 @@ void GLSpectrum::setWaterfallShare(Real waterfallShare)
|
||||
}
|
||||
m_changesPending = true;
|
||||
}
|
||||
|
||||
void GLSpectrum::connectTimer(const QTimer& timer)
|
||||
{
|
||||
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
}
|
||||
|
@ -87,6 +87,8 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
m_statusTimer.start(500);
|
||||
|
||||
m_masterTimer.start(50);
|
||||
|
||||
m_pluginManager->loadPlugins();
|
||||
bool sampleSourceSignalsBlocked = ui->sampleSource->blockSignals(true);
|
||||
m_pluginManager->fillSampleSourceSelector(ui->sampleSource);
|
||||
@ -100,6 +102,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
m_fileSink = new FileSink();
|
||||
m_dspEngine->addSink(m_fileSink);
|
||||
|
||||
ui->glSpectrum->connectTimer(m_masterTimer);
|
||||
ui->glSpectrumGUI->setBuddies(m_dspEngine->getMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
loadSettings();
|
||||
|
Loading…
Reference in New Issue
Block a user