1
0
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:
f4exb 2015-08-01 03:33:07 +02:00
parent a28d917531
commit e6caa94593
4 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,7 @@ public:
Real getWaterfallShare() const { return m_waterfallShare; }
void setWaterfallShare(Real waterfallShare);
void connectTimer(const QTimer& timer);
private:
struct ChannelMarkerState {

View File

@ -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;

View File

@ -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()));
}

View File

@ -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();