mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-03 14:32:25 -04:00
ATV Demod: applied new channel marker signal handling and fixed frequency shift handling
This commit is contained in:
parent
be170c455f
commit
4896b1bf40
@ -141,6 +141,7 @@ void ATVDemod::configure(
|
|||||||
|
|
||||||
void ATVDemod::configureRF(
|
void ATVDemod::configureRF(
|
||||||
MessageQueue* objMessageQueue,
|
MessageQueue* objMessageQueue,
|
||||||
|
int64_t frequencyOffset,
|
||||||
ATVModulation enmModulation,
|
ATVModulation enmModulation,
|
||||||
float fltRFBandwidth,
|
float fltRFBandwidth,
|
||||||
float fltRFOppBandwidth,
|
float fltRFOppBandwidth,
|
||||||
@ -150,6 +151,7 @@ void ATVDemod::configureRF(
|
|||||||
float fmDeviation)
|
float fmDeviation)
|
||||||
{
|
{
|
||||||
Message* msgCmd = MsgConfigureRFATVDemod::create(
|
Message* msgCmd = MsgConfigureRFATVDemod::create(
|
||||||
|
frequencyOffset,
|
||||||
enmModulation,
|
enmModulation,
|
||||||
fltRFBandwidth,
|
fltRFBandwidth,
|
||||||
fltRFOppBandwidth,
|
fltRFOppBandwidth,
|
||||||
@ -506,6 +508,7 @@ bool ATVDemod::handleMessage(const Message& cmd)
|
|||||||
m_rfConfig = objCfg.m_objMsgConfig;
|
m_rfConfig = objCfg.m_objMsgConfig;
|
||||||
|
|
||||||
qDebug() << "ATVDemod::handleMessage: MsgConfigureRFATVDemod:"
|
qDebug() << "ATVDemod::handleMessage: MsgConfigureRFATVDemod:"
|
||||||
|
<< " m_intFrequencyOffset:" << m_rfConfig.m_intFrequencyOffset
|
||||||
<< " m_enmModulation:" << m_rfConfig.m_enmModulation
|
<< " m_enmModulation:" << m_rfConfig.m_enmModulation
|
||||||
<< " m_fltRFBandwidth:" << m_rfConfig.m_fltRFBandwidth
|
<< " m_fltRFBandwidth:" << m_rfConfig.m_fltRFBandwidth
|
||||||
<< " m_fltRFOppBandwidth:" << m_rfConfig.m_fltRFOppBandwidth
|
<< " m_fltRFOppBandwidth:" << m_rfConfig.m_fltRFOppBandwidth
|
||||||
|
@ -208,6 +208,7 @@ public:
|
|||||||
int intVideoTabIndex);
|
int intVideoTabIndex);
|
||||||
|
|
||||||
void configureRF(MessageQueue* objMessageQueue,
|
void configureRF(MessageQueue* objMessageQueue,
|
||||||
|
int64_t frequencyOffset,
|
||||||
ATVModulation enmModulation,
|
ATVModulation enmModulation,
|
||||||
float fltRFBandwidth,
|
float fltRFBandwidth,
|
||||||
float fltRFOppBandwidth,
|
float fltRFOppBandwidth,
|
||||||
@ -317,6 +318,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static MsgConfigureRFATVDemod* create(
|
static MsgConfigureRFATVDemod* create(
|
||||||
|
int64_t frequencyOffset,
|
||||||
ATVModulation enmModulation,
|
ATVModulation enmModulation,
|
||||||
float fltRFBandwidth,
|
float fltRFBandwidth,
|
||||||
float fltRFOppBandwidth,
|
float fltRFOppBandwidth,
|
||||||
@ -326,6 +328,7 @@ private:
|
|||||||
float fmDeviation)
|
float fmDeviation)
|
||||||
{
|
{
|
||||||
return new MsgConfigureRFATVDemod(
|
return new MsgConfigureRFATVDemod(
|
||||||
|
frequencyOffset,
|
||||||
enmModulation,
|
enmModulation,
|
||||||
fltRFBandwidth,
|
fltRFBandwidth,
|
||||||
fltRFOppBandwidth,
|
fltRFOppBandwidth,
|
||||||
@ -339,6 +342,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
MsgConfigureRFATVDemod(
|
MsgConfigureRFATVDemod(
|
||||||
|
int64_t frequencyOffset,
|
||||||
ATVModulation enmModulation,
|
ATVModulation enmModulation,
|
||||||
float fltRFBandwidth,
|
float fltRFBandwidth,
|
||||||
float fltRFOppBandwidth,
|
float fltRFOppBandwidth,
|
||||||
@ -348,6 +352,7 @@ private:
|
|||||||
float fmDeviation) :
|
float fmDeviation) :
|
||||||
Message()
|
Message()
|
||||||
{
|
{
|
||||||
|
m_objMsgConfig.m_intFrequencyOffset = frequencyOffset;
|
||||||
m_objMsgConfig.m_enmModulation = enmModulation;
|
m_objMsgConfig.m_enmModulation = enmModulation;
|
||||||
m_objMsgConfig.m_fltRFBandwidth = fltRFBandwidth;
|
m_objMsgConfig.m_fltRFBandwidth = fltRFBandwidth;
|
||||||
m_objMsgConfig.m_fltRFOppBandwidth = fltRFOppBandwidth;
|
m_objMsgConfig.m_fltRFOppBandwidth = fltRFOppBandwidth;
|
||||||
|
@ -189,6 +189,7 @@ bool ATVDemodGUI::deserialize(const QByteArray& arrData)
|
|||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
|
m_channelMarker.emitChangedByAPI();
|
||||||
|
|
||||||
lineTimeUpdate();
|
lineTimeUpdate();
|
||||||
topTimeUpdate();
|
topTimeUpdate();
|
||||||
@ -235,9 +236,11 @@ bool ATVDemodGUI::handleMessage(const Message& objMessage)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATVDemodGUI::viewChanged()
|
void ATVDemodGUI::channelMarkerChangedByCursor()
|
||||||
{
|
{
|
||||||
qDebug("ATVDemodGUI::viewChanged");
|
qDebug("ATVDemodGUI::channelMarkerChangedByCursor");
|
||||||
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
|
|
||||||
applySettings();
|
applySettings();
|
||||||
applyRFSettings();
|
applyRFSettings();
|
||||||
}
|
}
|
||||||
@ -287,14 +290,14 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
|
|||||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||||
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
||||||
|
|
||||||
|
m_channelMarker.blockSignals(true);
|
||||||
m_channelMarker.setColor(Qt::white);
|
m_channelMarker.setColor(Qt::white);
|
||||||
m_channelMarker.setMovable(false);
|
|
||||||
m_channelMarker.setBandwidth(6000000);
|
m_channelMarker.setBandwidth(6000000);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.blockSignals(false);
|
||||||
setTitleColor(m_channelMarker.getColor());
|
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
setTitleColor(m_channelMarker.getColor());
|
||||||
|
|
||||||
m_deviceUISet->registerRxChannelInstance(ATVDemod::m_channelID, this);
|
m_deviceUISet->registerRxChannelInstance(ATVDemod::m_channelID, this);
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
@ -321,6 +324,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
|
|||||||
ui->scopeGUI->changeTrigger(0, triggerData);
|
ui->scopeGUI->changeTrigger(0, triggerData);
|
||||||
ui->scopeGUI->focusOnTrigger(0); // re-focus to take changes into account in the GUI
|
ui->scopeGUI->focusOnTrigger(0); // re-focus to take changes into account in the GUI
|
||||||
|
|
||||||
|
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
|
|
||||||
QChar delta = QChar(0x94, 0x03);
|
QChar delta = QChar(0x94, 0x03);
|
||||||
@ -344,8 +348,6 @@ void ATVDemodGUI::applySettings()
|
|||||||
{
|
{
|
||||||
if (m_blnDoApplySettings)
|
if (m_blnDoApplySettings)
|
||||||
{
|
{
|
||||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
|
||||||
|
|
||||||
ATVDemod::MsgConfigureChannelizer *msgChan = ATVDemod::MsgConfigureChannelizer::create(
|
ATVDemod::MsgConfigureChannelizer *msgChan = ATVDemod::MsgConfigureChannelizer::create(
|
||||||
m_channelMarker.getCenterFrequency());
|
m_channelMarker.getCenterFrequency());
|
||||||
m_atvDemod->getInputMessageQueue()->push(msgChan);
|
m_atvDemod->getInputMessageQueue()->push(msgChan);
|
||||||
@ -375,6 +377,7 @@ void ATVDemodGUI::applyRFSettings()
|
|||||||
if (m_blnDoApplySettings)
|
if (m_blnDoApplySettings)
|
||||||
{
|
{
|
||||||
m_atvDemod->configureRF(m_atvDemod->getInputMessageQueue(),
|
m_atvDemod->configureRF(m_atvDemod->getInputMessageQueue(),
|
||||||
|
m_channelMarker.getCenterFrequency(),
|
||||||
(ATVDemod::ATVModulation) ui->modulation->currentIndex(),
|
(ATVDemod::ATVModulation) ui->modulation->currentIndex(),
|
||||||
ui->rfBW->value() * m_rfSliderDivisor * 1.0f,
|
ui->rfBW->value() * m_rfSliderDivisor * 1.0f,
|
||||||
ui->rfOppBW->value() * m_rfSliderDivisor * 1.0f,
|
ui->rfOppBW->value() * m_rfSliderDivisor * 1.0f,
|
||||||
@ -388,6 +391,7 @@ void ATVDemodGUI::applyRFSettings()
|
|||||||
void ATVDemodGUI::setChannelMarkerBandwidth()
|
void ATVDemodGUI::setChannelMarkerBandwidth()
|
||||||
{
|
{
|
||||||
m_blnDoApplySettings = false; // avoid infinite recursion
|
m_blnDoApplySettings = false; // avoid infinite recursion
|
||||||
|
m_channelMarker.blockSignals(true);
|
||||||
|
|
||||||
if (ui->rfFiltering->isChecked()) // FFT filter
|
if (ui->rfFiltering->isChecked()) // FFT filter
|
||||||
{
|
{
|
||||||
@ -413,6 +417,8 @@ void ATVDemodGUI::setChannelMarkerBandwidth()
|
|||||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_channelMarker.blockSignals(false);
|
||||||
|
m_channelMarker.emitChangedByAPI();
|
||||||
m_blnDoApplySettings = true;
|
m_blnDoApplySettings = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,16 +449,12 @@ void ATVDemodGUI::setRFFiltersSlidersRange(int sampleRate)
|
|||||||
|
|
||||||
void ATVDemodGUI::leaveEvent(QEvent*)
|
void ATVDemodGUI::leaveEvent(QEvent*)
|
||||||
{
|
{
|
||||||
blockApplySettings(true);
|
|
||||||
m_channelMarker.setHighlighted(false);
|
m_channelMarker.setHighlighted(false);
|
||||||
blockApplySettings(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATVDemodGUI::enterEvent(QEvent*)
|
void ATVDemodGUI::enterEvent(QEvent*)
|
||||||
{
|
{
|
||||||
blockApplySettings(true);
|
|
||||||
m_channelMarker.setHighlighted(true);
|
m_channelMarker.setHighlighted(true);
|
||||||
blockApplySettings(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATVDemodGUI::tick()
|
void ATVDemodGUI::tick()
|
||||||
@ -589,6 +591,7 @@ void ATVDemodGUI::on_decimatorEnable_toggled(bool checked __attribute__((unused)
|
|||||||
void ATVDemodGUI::on_deltaFrequency_changed(qint64 value)
|
void ATVDemodGUI::on_deltaFrequency_changed(qint64 value)
|
||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
|
applyRFSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATVDemodGUI::on_bfo_valueChanged(int value)
|
void ATVDemodGUI::on_bfo_valueChanged(int value)
|
||||||
|
@ -54,32 +54,8 @@ public:
|
|||||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
virtual bool handleMessage(const Message& objMessage);
|
virtual bool handleMessage(const Message& objMessage);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void viewChanged();
|
void channelMarkerChangedByCursor();
|
||||||
void handleSourceMessages();
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
|
||||||
void tick();
|
|
||||||
void on_synchLevel_valueChanged(int value);
|
|
||||||
void on_blackLevel_valueChanged(int value);
|
|
||||||
void on_lineTime_valueChanged(int value);
|
|
||||||
void on_topTime_valueChanged(int value);
|
|
||||||
void on_hSync_clicked();
|
|
||||||
void on_vSync_clicked();
|
|
||||||
void on_invertVideo_clicked();
|
|
||||||
void on_halfImage_clicked();
|
|
||||||
void on_modulation_currentIndexChanged(int index);
|
|
||||||
void on_nbLines_currentIndexChanged(int index);
|
|
||||||
void on_fps_currentIndexChanged(int index);
|
|
||||||
void on_standard_currentIndexChanged(int index);
|
|
||||||
void on_reset_clicked(bool checked);
|
|
||||||
void on_rfBW_valueChanged(int value);
|
|
||||||
void on_rfOppBW_valueChanged(int value);
|
|
||||||
void on_rfFiltering_toggled(bool checked);
|
|
||||||
void on_decimatorEnable_toggled(bool checked);
|
|
||||||
void on_deltaFrequency_changed(qint64 value);
|
|
||||||
void on_bfo_valueChanged(int value);
|
|
||||||
void on_fmDeviation_valueChanged(int value);
|
|
||||||
void on_screenTabWidget_currentChanged(int index);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ATVDemodGUI* ui;
|
Ui::ATVDemodGUI* ui;
|
||||||
@ -117,6 +93,32 @@ private:
|
|||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void handleSourceMessages();
|
||||||
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
|
void tick();
|
||||||
|
void on_synchLevel_valueChanged(int value);
|
||||||
|
void on_blackLevel_valueChanged(int value);
|
||||||
|
void on_lineTime_valueChanged(int value);
|
||||||
|
void on_topTime_valueChanged(int value);
|
||||||
|
void on_hSync_clicked();
|
||||||
|
void on_vSync_clicked();
|
||||||
|
void on_invertVideo_clicked();
|
||||||
|
void on_halfImage_clicked();
|
||||||
|
void on_modulation_currentIndexChanged(int index);
|
||||||
|
void on_nbLines_currentIndexChanged(int index);
|
||||||
|
void on_fps_currentIndexChanged(int index);
|
||||||
|
void on_standard_currentIndexChanged(int index);
|
||||||
|
void on_reset_clicked(bool checked);
|
||||||
|
void on_rfBW_valueChanged(int value);
|
||||||
|
void on_rfOppBW_valueChanged(int value);
|
||||||
|
void on_rfFiltering_toggled(bool checked);
|
||||||
|
void on_decimatorEnable_toggled(bool checked);
|
||||||
|
void on_deltaFrequency_changed(qint64 value);
|
||||||
|
void on_bfo_valueChanged(int value);
|
||||||
|
void on_fmDeviation_valueChanged(int value);
|
||||||
|
void on_screenTabWidget_currentChanged(int index);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_ATVDEMODGUI_H
|
#endif // INCLUDE_ATVDEMODGUI_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user