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