mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-15 13:02:27 -04: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; }
|
Real getWaterfallShare() const { return m_waterfallShare; }
|
||||||
void setWaterfallShare(Real waterfallShare);
|
void setWaterfallShare(Real waterfallShare);
|
||||||
|
void connectTimer(const QTimer& timer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct ChannelMarkerState {
|
struct ChannelMarkerState {
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
void removeChannelMarker(ChannelMarker* channelMarker);
|
void removeChannelMarker(ChannelMarker* channelMarker);
|
||||||
|
|
||||||
void setInputGUI(QWidget* gui);
|
void setInputGUI(QWidget* gui);
|
||||||
|
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
@ -81,6 +82,7 @@ private:
|
|||||||
|
|
||||||
DSPEngine* m_dspEngine;
|
DSPEngine* m_dspEngine;
|
||||||
|
|
||||||
|
QTimer m_masterTimer;
|
||||||
QTimer m_statusTimer;
|
QTimer m_statusTimer;
|
||||||
int m_lastEngineState;
|
int m_lastEngineState;
|
||||||
|
|
||||||
|
@ -1543,3 +1543,9 @@ void GLSpectrum::setWaterfallShare(Real waterfallShare)
|
|||||||
}
|
}
|
||||||
m_changesPending = true;
|
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()));
|
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||||
m_statusTimer.start(500);
|
m_statusTimer.start(500);
|
||||||
|
|
||||||
|
m_masterTimer.start(50);
|
||||||
|
|
||||||
m_pluginManager->loadPlugins();
|
m_pluginManager->loadPlugins();
|
||||||
bool sampleSourceSignalsBlocked = ui->sampleSource->blockSignals(true);
|
bool sampleSourceSignalsBlocked = ui->sampleSource->blockSignals(true);
|
||||||
m_pluginManager->fillSampleSourceSelector(ui->sampleSource);
|
m_pluginManager->fillSampleSourceSelector(ui->sampleSource);
|
||||||
@ -100,6 +102,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
m_fileSink = new FileSink();
|
m_fileSink = new FileSink();
|
||||||
m_dspEngine->addSink(m_fileSink);
|
m_dspEngine->addSink(m_fileSink);
|
||||||
|
|
||||||
|
ui->glSpectrum->connectTimer(m_masterTimer);
|
||||||
ui->glSpectrumGUI->setBuddies(m_dspEngine->getMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
ui->glSpectrumGUI->setBuddies(m_dspEngine->getMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user