mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-19 01:05:35 -04:00
ATV demod: GUI and demod separation (1)
This commit is contained in:
parent
f32f0333e7
commit
5131fb86b1
@ -28,6 +28,7 @@
|
|||||||
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureATVDemod, Message)
|
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureATVDemod, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureRFATVDemod, Message)
|
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureRFATVDemod, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportEffectiveSampleRate, Message)
|
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportEffectiveSampleRate, Message)
|
||||||
|
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgReportChannelSampleRateChanged, Message)
|
||||||
|
|
||||||
const int ATVDemod::m_ssbFftLen = 1024;
|
const int ATVDemod::m_ssbFftLen = 1024;
|
||||||
|
|
||||||
|
@ -147,6 +147,26 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MsgReportChannelSampleRateChanged : public Message {
|
||||||
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
public:
|
||||||
|
int getSampleRate() const { return m_sampleRate; }
|
||||||
|
|
||||||
|
static MsgReportChannelSampleRateChanged* create(int sampleRate)
|
||||||
|
{
|
||||||
|
return new MsgReportChannelSampleRateChanged(sampleRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
int m_sampleRate;
|
||||||
|
|
||||||
|
MsgReportChannelSampleRateChanged(int sampleRate) :
|
||||||
|
Message(),
|
||||||
|
m_sampleRate(sampleRate)
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
ATVDemod(DeviceSourceAPI *deviceAPI);
|
ATVDemod(DeviceSourceAPI *deviceAPI);
|
||||||
~ATVDemod();
|
~ATVDemod();
|
||||||
void setScopeSink(BasebandSampleSink* scopeSink) { m_scopeSink = scopeSink; }
|
void setScopeSink(BasebandSampleSink* scopeSink) { m_scopeSink = scopeSink; }
|
||||||
|
@ -235,6 +235,7 @@ void ATVDemodGUI::viewChanged()
|
|||||||
void ATVDemodGUI::channelSampleRateChanged()
|
void ATVDemodGUI::channelSampleRateChanged()
|
||||||
{
|
{
|
||||||
qDebug("ATVDemodGUI::channelSampleRateChanged");
|
qDebug("ATVDemodGUI::channelSampleRateChanged");
|
||||||
|
m_inputSampleRate = m_channelizer->getInputSampleRate();
|
||||||
applySettings();
|
applySettings();
|
||||||
applyRFSettings();
|
applyRFSettings();
|
||||||
}
|
}
|
||||||
@ -277,7 +278,8 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet,
|
|||||||
m_blnBasicSettingsShown(false),
|
m_blnBasicSettingsShown(false),
|
||||||
m_blnDoApplySettings(true),
|
m_blnDoApplySettings(true),
|
||||||
m_objMagSqAverage(40, 0),
|
m_objMagSqAverage(40, 0),
|
||||||
m_intTickCount(0)
|
m_intTickCount(0),
|
||||||
|
m_inputSampleRate(48000)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
@ -429,7 +431,8 @@ void ATVDemodGUI::setChannelMarkerBandwidth()
|
|||||||
if (ui->decimatorEnable->isChecked()) {
|
if (ui->decimatorEnable->isChecked()) {
|
||||||
m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor);
|
m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor);
|
||||||
} else {
|
} else {
|
||||||
m_channelMarker.setBandwidth(m_channelizer->getInputSampleRate());
|
// m_channelMarker.setBandwidth(m_channelizer->getInputSampleRate());
|
||||||
|
m_channelMarker.setBandwidth(m_inputSampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||||
|
@ -107,6 +107,7 @@ private:
|
|||||||
float m_fltLineTimeMultiplier;
|
float m_fltLineTimeMultiplier;
|
||||||
float m_fltTopTimeMultiplier;
|
float m_fltTopTimeMultiplier;
|
||||||
int m_rfSliderDivisor;
|
int m_rfSliderDivisor;
|
||||||
|
int m_inputSampleRate;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, QWidget* objParent = 0);
|
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, QWidget* objParent = 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user