mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-25 03:32:29 -04:00
DATV demod: GUI changes (2)
This commit is contained in:
parent
82ec3891c5
commit
d1fafce4b6
@ -101,7 +101,7 @@ DATVDemod::~DATVDemod()
|
|||||||
void DATVDemod::channelSampleRateChanged()
|
void DATVDemod::channelSampleRateChanged()
|
||||||
{
|
{
|
||||||
qDebug() << "DATVDemod::channelSampleRateChanged:"
|
qDebug() << "DATVDemod::channelSampleRateChanged:"
|
||||||
<< " intMsps: " << m_channelizer->getInputSampleRate();
|
<< " sample rate: " << m_channelizer->getInputSampleRate();
|
||||||
|
|
||||||
if(m_objRunning.intMsps!=m_channelizer->getInputSampleRate())
|
if(m_objRunning.intMsps!=m_channelizer->getInputSampleRate())
|
||||||
{
|
{
|
||||||
@ -444,18 +444,18 @@ void DATVDemod::InitDATVFramework()
|
|||||||
CleanUpDATVFramework(false);
|
CleanUpDATVFramework(false);
|
||||||
|
|
||||||
qDebug() << "DATVDemod::InitDATVParameters:"
|
qDebug() << "DATVDemod::InitDATVParameters:"
|
||||||
<< " - Msps: " << m_objRunning.intMsps
|
<< " Msps: " << m_objRunning.intMsps
|
||||||
<< " - Sample Rate: " << m_objRunning.intSampleRate
|
<< " Sample Rate: " << m_objRunning.intSampleRate
|
||||||
<< " - Symbol Rate: " << m_objRunning.intSymbolRate
|
<< " Symbol Rate: " << m_objRunning.intSymbolRate
|
||||||
<< " - Modulation: " << m_objRunning.enmModulation
|
<< " Modulation: " << m_objRunning.enmModulation
|
||||||
<< " - Notch Filters: " << m_objRunning.intNotchFilters
|
<< " Notch Filters: " << m_objRunning.intNotchFilters
|
||||||
<< " - Allow Drift: " << m_objRunning.blnAllowDrift
|
<< " Allow Drift: " << m_objRunning.blnAllowDrift
|
||||||
<< " - Fast Lock: " << m_objRunning.blnFastLock
|
<< " Fast Lock: " << m_objRunning.blnFastLock
|
||||||
<< " - Filter: " << m_objRunning.enmFilter
|
<< " Filter: " << m_objRunning.enmFilter
|
||||||
<< " - HARD METRIC: " << m_objRunning.blnHardMetric
|
<< " HARD METRIC: " << m_objRunning.blnHardMetric
|
||||||
<< " - RollOff: " << m_objRunning.fltRollOff
|
<< " RollOff: " << m_objRunning.fltRollOff
|
||||||
<< " - Viterbi: " << m_objRunning.blnViterbi
|
<< " Viterbi: " << m_objRunning.blnViterbi
|
||||||
<< " - Excursion: " << m_objRunning.intExcursion;
|
<< " Excursion: " << m_objRunning.intExcursion;
|
||||||
|
|
||||||
m_objCfg.standard = m_objRunning.enmStandard;
|
m_objCfg.standard = m_objRunning.enmStandard;
|
||||||
|
|
||||||
@ -935,8 +935,22 @@ bool DATVDemod::handleMessage(const Message& cmd)
|
|||||||
m_objRunning.intCenterFrequency = objCfg.m_objMsgConfig.intCenterFrequency;
|
m_objRunning.intCenterFrequency = objCfg.m_objMsgConfig.intCenterFrequency;
|
||||||
m_objRunning.intExcursion = objCfg.m_objMsgConfig.intExcursion;
|
m_objRunning.intExcursion = objCfg.m_objMsgConfig.intExcursion;
|
||||||
|
|
||||||
qDebug() << "ATVDemod::handleMessage: MsgConfigureDATVDemod: sampleRate: " << m_objRunning.intMsps
|
qDebug() << "ATVDemod::handleMessage: MsgConfigureDATVDemod:"
|
||||||
<< " sampleRate: " << m_objRunning.intSampleRate;
|
<< " blnAllowDrift: " << objCfg.m_objMsgConfig.blnAllowDrift
|
||||||
|
<< " intRFBandwidth: " << objCfg.m_objMsgConfig.intRFBandwidth
|
||||||
|
<< " intCenterFrequency: " << objCfg.m_objMsgConfig.intCenterFrequency
|
||||||
|
<< " blnFastLock: " << objCfg.m_objMsgConfig.blnFastLock
|
||||||
|
<< " enmFilter: " << objCfg.m_objMsgConfig.enmFilter
|
||||||
|
<< " fltRollOff: " << objCfg.m_objMsgConfig.fltRollOff
|
||||||
|
<< " blnViterbi: " << objCfg.m_objMsgConfig.blnViterbi
|
||||||
|
<< " enmFEC: " << objCfg.m_objMsgConfig.enmFEC
|
||||||
|
<< " enmModulation: " << objCfg.m_objMsgConfig.enmModulation
|
||||||
|
<< " enmStandard: " << objCfg.m_objMsgConfig.enmStandard
|
||||||
|
<< " intNotchFilters: " << objCfg.m_objMsgConfig.intNotchFilters
|
||||||
|
<< " intSymbolRate: " << objCfg.m_objMsgConfig.intSymbolRate
|
||||||
|
<< " intRFBandwidth: " << objCfg.m_objMsgConfig.intRFBandwidth
|
||||||
|
<< " intCenterFrequency: " << objCfg.m_objMsgConfig.intCenterFrequency
|
||||||
|
<< " intExcursion: " << objCfg.m_objMsgConfig.intExcursion;
|
||||||
|
|
||||||
ApplySettings();
|
ApplySettings();
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ void DATVDemodGUI::resetToDefaults()
|
|||||||
|
|
||||||
ui->lblStatus->setText("");
|
ui->lblStatus->setText("");
|
||||||
|
|
||||||
ui->spiBandwidth->setValue(512000);
|
ui->rfBandwidth->setValue(512000);
|
||||||
ui->spiSymbolRate->setValue(250000);
|
ui->spiSymbolRate->setValue(250000);
|
||||||
ui->spiRollOff->setValue(35);
|
ui->spiRollOff->setValue(35);
|
||||||
ui->spiExcursion->setValue(10);
|
ui->spiExcursion->setValue(10);
|
||||||
@ -122,7 +122,7 @@ QByteArray DATVDemodGUI::serialize() const
|
|||||||
s.writeS32(11, ui->cmbStandard->currentIndex());
|
s.writeS32(11, ui->cmbStandard->currentIndex());
|
||||||
|
|
||||||
s.writeS32(12, ui->spiNotchFilters->value());
|
s.writeS32(12, ui->spiNotchFilters->value());
|
||||||
s.writeS32(13, ui->spiBandwidth->value());
|
s.writeS64(13, ui->rfBandwidth->getValue());
|
||||||
s.writeS32(14, ui->spiSymbolRate->value());
|
s.writeS32(14, ui->spiSymbolRate->value());
|
||||||
s.writeS32(15, ui->spiExcursion->value());
|
s.writeS32(15, ui->spiExcursion->value());
|
||||||
|
|
||||||
@ -143,6 +143,7 @@ bool DATVDemodGUI::deserialize(const QByteArray& arrData)
|
|||||||
{
|
{
|
||||||
QByteArray bytetmp;
|
QByteArray bytetmp;
|
||||||
uint32_t u32tmp;
|
uint32_t u32tmp;
|
||||||
|
qint64 i64tmp;
|
||||||
int tmp;
|
int tmp;
|
||||||
bool booltmp;
|
bool booltmp;
|
||||||
|
|
||||||
@ -194,8 +195,8 @@ bool DATVDemodGUI::deserialize(const QByteArray& arrData)
|
|||||||
d.readS32(12, &tmp, 0);
|
d.readS32(12, &tmp, 0);
|
||||||
ui->spiNotchFilters->setValue(tmp);
|
ui->spiNotchFilters->setValue(tmp);
|
||||||
|
|
||||||
d.readS32(13, &tmp, 1024000);
|
d.readS64(13, &i64tmp, 5120000);
|
||||||
ui->spiBandwidth->setValue(tmp);
|
ui->rfBandwidth->setValue(i64tmp);
|
||||||
|
|
||||||
d.readS32(14, &tmp, 250000);
|
d.readS32(14, &tmp, 250000);
|
||||||
ui->spiSymbolRate->setValue(tmp);
|
ui->spiSymbolRate->setValue(tmp);
|
||||||
@ -224,6 +225,8 @@ bool DATVDemodGUI::handleMessage(const Message& objMessage __attribute__((unused
|
|||||||
|
|
||||||
void DATVDemodGUI::channelMarkerChangedByCursor()
|
void DATVDemodGUI::channelMarkerChangedByCursor()
|
||||||
{
|
{
|
||||||
|
ui->deltaFrequency->setValue(m_objChannelMarker.getCenterFrequency());
|
||||||
|
|
||||||
if(m_intCenterFrequency!=m_objChannelMarker.getCenterFrequency())
|
if(m_intCenterFrequency!=m_objChannelMarker.getCenterFrequency())
|
||||||
{
|
{
|
||||||
m_intCenterFrequency=m_objChannelMarker.getCenterFrequency();
|
m_intCenterFrequency=m_objChannelMarker.getCenterFrequency();
|
||||||
@ -282,7 +285,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
|||||||
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
||||||
|
|
||||||
ui->rfBandwidth->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
|
ui->rfBandwidth->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
|
||||||
ui->rfBandwidth->setValueRange(7, 0, 9999999);
|
ui->rfBandwidth->setValueRange(true, 7, 0, 9999999);
|
||||||
|
|
||||||
m_objChannelMarker.blockSignals(true);
|
m_objChannelMarker.blockSignals(true);
|
||||||
m_objChannelMarker.setColor(Qt::magenta);
|
m_objChannelMarker.setColor(Qt::magenta);
|
||||||
@ -331,12 +334,13 @@ void DATVDemodGUI::applySettings()
|
|||||||
|
|
||||||
if (m_blnDoApplySettings)
|
if (m_blnDoApplySettings)
|
||||||
{
|
{
|
||||||
|
//Bandwidth and center frequency
|
||||||
|
m_objChannelMarker.setCenterFrequency(ui->deltaFrequency->getValueNew());
|
||||||
|
m_objChannelMarker.setBandwidth(ui->rfBandwidth->getValueNew());
|
||||||
|
|
||||||
DATVDemod::MsgConfigureChannelizer *msgChan = DATVDemod::MsgConfigureChannelizer::create(m_objChannelMarker.getCenterFrequency());
|
DATVDemod::MsgConfigureChannelizer *msgChan = DATVDemod::MsgConfigureChannelizer::create(m_objChannelMarker.getCenterFrequency());
|
||||||
m_objDATVDemod->getInputMessageQueue()->push(msgChan);
|
m_objDATVDemod->getInputMessageQueue()->push(msgChan);
|
||||||
|
|
||||||
//Bandwidth and center frequency
|
|
||||||
m_objChannelMarker.setBandwidth(ui->spiBandwidth->value());
|
|
||||||
|
|
||||||
setTitleColor(m_objChannelMarker.getColor());
|
setTitleColor(m_objChannelMarker.getColor());
|
||||||
|
|
||||||
strStandard = ui->cmbStandard->currentText();
|
strStandard = ui->cmbStandard->currentText();
|
||||||
@ -478,10 +482,8 @@ void DATVDemodGUI::applySettings()
|
|||||||
ui->spiExcursion->value());
|
ui->spiExcursion->value());
|
||||||
|
|
||||||
qDebug() << "DATVDemodGUI::applySettings:"
|
qDebug() << "DATVDemodGUI::applySettings:"
|
||||||
<< " .inputSampleRate: " << 0 /*m_objChannelizer->getInputSampleRate()*/
|
<< " m_objDATVDemod->getCenterFrequency: " << m_objDATVDemod->getCenterFrequency()
|
||||||
<< " m_objDATVDemod.sampleRate: " << m_objDATVDemod->GetSampleRate();
|
<< " m_objDATVDemod->GetSampleRate: " << m_objDATVDemod->GetSampleRate();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,6 +717,15 @@ void DATVDemodGUI::on_spiBandwidth_valueChanged(int arg1 __attribute__((unused))
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DATVDemodGUI::on_deltaFrequency_changed(qint64 value __attribute__((unused)))
|
||||||
|
{
|
||||||
|
applySettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DATVDemodGUI::on_rfBandwidth_changed(qint64 value __attribute__((unused)))
|
||||||
|
{
|
||||||
|
applySettings();
|
||||||
|
}
|
||||||
|
|
||||||
void DATVDemodGUI::on_chkFastlock_clicked()
|
void DATVDemodGUI::on_chkFastlock_clicked()
|
||||||
{
|
{
|
||||||
@ -730,13 +741,13 @@ void DATVDemodGUI::on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData)
|
|||||||
|
|
||||||
if(objMetaData->OK_TransportStream==true)
|
if(objMetaData->OK_TransportStream==true)
|
||||||
{
|
{
|
||||||
strMetaData.sprintf("PID: %d - Width: %d - Height: %d\r\n%s%s\r\nCodec: %s\r\n",objMetaData->PID
|
strMetaData.sprintf("PID: %d - Width: %d - Height: %d\r\n%s%s\r\nCodec: %s\r\n",
|
||||||
,objMetaData->Width
|
objMetaData->PID,
|
||||||
,objMetaData->Height
|
objMetaData->Width,
|
||||||
,objMetaData->Program.toStdString().c_str()
|
objMetaData->Height,
|
||||||
,objMetaData->Stream.toStdString().c_str()
|
objMetaData->Program.toStdString().c_str(),
|
||||||
,objMetaData->CodecDescription.toStdString().c_str());
|
objMetaData->Stream.toStdString().c_str(),
|
||||||
|
objMetaData->CodecDescription.toStdString().c_str());
|
||||||
}
|
}
|
||||||
ui->textEdit->setText(strMetaData);
|
ui->textEdit->setText(strMetaData);
|
||||||
|
|
||||||
|
@ -81,32 +81,22 @@ private slots:
|
|||||||
void on_cmbFEC_currentIndexChanged(const QString &arg1);
|
void on_cmbFEC_currentIndexChanged(const QString &arg1);
|
||||||
void on_chkViterbi_clicked();
|
void on_chkViterbi_clicked();
|
||||||
void on_chkHardMetric_clicked();
|
void on_chkHardMetric_clicked();
|
||||||
|
|
||||||
void on_pushButton_2_clicked();
|
void on_pushButton_2_clicked();
|
||||||
|
|
||||||
void on_spiSymbolRate_valueChanged(int arg1);
|
void on_spiSymbolRate_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_spiNotchFilters_valueChanged(int arg1);
|
void on_spiNotchFilters_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_chkAllowDrift_clicked();
|
void on_chkAllowDrift_clicked();
|
||||||
|
|
||||||
void on_pushButton_3_clicked();
|
void on_pushButton_3_clicked();
|
||||||
|
|
||||||
void on_pushButton_4_clicked();
|
void on_pushButton_4_clicked();
|
||||||
|
|
||||||
void on_mouseEvent(QMouseEvent* obj);
|
void on_mouseEvent(QMouseEvent* obj);
|
||||||
void on_StreamDataAvailable(int *intPackets, int *intBytes, int *intPercent, qint64 *intTotalReceived);
|
void on_StreamDataAvailable(int *intPackets, int *intBytes, int *intPercent, qint64 *intTotalReceived);
|
||||||
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData);
|
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData);
|
||||||
|
|
||||||
void on_spiBandwidth_valueChanged(int arg1);
|
void on_spiBandwidth_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_chkFastlock_clicked();
|
void on_chkFastlock_clicked();
|
||||||
|
|
||||||
void on_cmbFilter_currentIndexChanged(int index);
|
void on_cmbFilter_currentIndexChanged(int index);
|
||||||
|
|
||||||
void on_spiRollOff_valueChanged(int arg1);
|
void on_spiRollOff_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_spiExcursion_valueChanged(int arg1);
|
void on_spiExcursion_valueChanged(int arg1);
|
||||||
|
void on_deltaFrequency_changed(qint64 value);
|
||||||
|
void on_rfBandwidth_changed(qint64 value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DATVDemodGUI* ui;
|
Ui::DATVDemodGUI* ui;
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="ValueDial" name="rfBandwidth" native="true">
|
<widget class="ValueDialZ" name="rfBandwidth" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -138,11 +138,8 @@
|
|||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="cursor">
|
|
||||||
<cursorShape>PointingHandCursor</cursorShape>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>RF bandwidth</string>
|
<string>RF Bandwidth</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -969,12 +966,6 @@
|
|||||||
<header>gui/valuedialz.h</header>
|
<header>gui/valuedialz.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>ValueDial</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>gui/valuedial.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user