mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
SpectrumVis: removed own configureDSP
This commit is contained in:
parent
45ef7b3546
commit
79b670d919
@ -36,7 +36,6 @@ inline double log2f(double n)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureSpectrumVis, Message)
|
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureSpectrumVis, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureDSP, Message)
|
|
||||||
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureScalingFactor, Message)
|
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureScalingFactor, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureWSpectrumOpenClose, Message)
|
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureWSpectrumOpenClose, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureWSpectrum, Message)
|
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureWSpectrum, Message)
|
||||||
@ -107,12 +106,6 @@ void SpectrumVis::configure(MessageQueue* msgQueue,
|
|||||||
msgQueue->push(cmd);
|
msgQueue->push(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpectrumVis::configureDSP(uint64_t centerFrequency, int sampleRate)
|
|
||||||
{
|
|
||||||
MsgConfigureDSP* cmd = new MsgConfigureDSP(centerFrequency, sampleRate);
|
|
||||||
getInputMessageQueue()->push(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SpectrumVis::setScalef(Real scalef)
|
void SpectrumVis::setScalef(Real scalef)
|
||||||
{
|
{
|
||||||
MsgConfigureScalingFactor* cmd = new MsgConfigureScalingFactor(scalef);
|
MsgConfigureScalingFactor* cmd = new MsgConfigureScalingFactor(scalef);
|
||||||
@ -653,13 +646,6 @@ bool SpectrumVis::handleMessage(const Message& message)
|
|||||||
applySettings(cfg.getSettings(), cfg.getForce());
|
applySettings(cfg.getSettings(), cfg.getForce());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureDSP::match(message))
|
|
||||||
{
|
|
||||||
// This is coming from plugins GUI via configureDSP for auxiliary spectra
|
|
||||||
MsgConfigureDSP& conf = (MsgConfigureDSP&) message;
|
|
||||||
handleConfigureDSP(conf.getCenterFrequency(), conf.getSampleRate());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (MsgConfigureScalingFactor::match(message))
|
else if (MsgConfigureScalingFactor::match(message))
|
||||||
{
|
{
|
||||||
MsgConfigureScalingFactor& conf = (MsgConfigureScalingFactor&) message;
|
MsgConfigureScalingFactor& conf = (MsgConfigureScalingFactor&) message;
|
||||||
|
@ -87,7 +87,6 @@ public:
|
|||||||
AvgMode averagingMode,
|
AvgMode averagingMode,
|
||||||
FFTWindow::Function window,
|
FFTWindow::Function window,
|
||||||
bool m_linear);
|
bool m_linear);
|
||||||
void configureDSP(uint64_t centerFrequency, int sampleRate);
|
|
||||||
void setScalef(Real scalef);
|
void setScalef(Real scalef);
|
||||||
void configureWSSpectrum(const QString& address, uint16_t port);
|
void configureWSSpectrum(const QString& address, uint16_t port);
|
||||||
|
|
||||||
@ -99,25 +98,6 @@ public:
|
|||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class MsgConfigureDSP : public Message
|
|
||||||
{
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
MsgConfigureDSP(uint64_t centerFrequency, int sampleRate) :
|
|
||||||
Message(),
|
|
||||||
m_centerFrequency(centerFrequency),
|
|
||||||
m_sampleRate(sampleRate)
|
|
||||||
{}
|
|
||||||
|
|
||||||
uint64_t getCenterFrequency() const { return m_centerFrequency; }
|
|
||||||
int getSampleRate() const { return m_sampleRate; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
uint64_t m_centerFrequency;
|
|
||||||
int m_sampleRate;
|
|
||||||
};
|
|
||||||
|
|
||||||
class MsgConfigureScalingFactor : public Message
|
class MsgConfigureScalingFactor : public Message
|
||||||
{
|
{
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
@ -199,10 +179,9 @@ private:
|
|||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
|
|
||||||
void applySettings(const GLSpectrumSettings& settings, bool force = false);
|
void applySettings(const GLSpectrumSettings& settings, bool force = false);
|
||||||
void handleWSOpenClose(bool openClose);
|
void handleConfigureDSP(uint64_t centerFrequency, int sampleRate);
|
||||||
void handleConfigureDSP(uint64_t centerFrequency,
|
|
||||||
int sampleRate);
|
|
||||||
void handleScalef(Real scalef);
|
void handleScalef(Real scalef);
|
||||||
|
void handleWSOpenClose(bool openClose);
|
||||||
void handleConfigureWSSpectrum(const QString& address, uint16_t port);
|
void handleConfigureWSSpectrum(const QString& address, uint16_t port);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user