diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 9df4450ca..2824f7aa1 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -295,8 +295,9 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI, ui->glScope->connectTimer(m_objPluginAPI->getMainWindow()->getMasterTimer()); connect(&m_objPluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms + ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); - ui->deltaFrequency->setValueRange(7, 0U, 9999999U); + ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); connect(m_objChannelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged())); @@ -363,8 +364,7 @@ void ATVDemodGUI::applySettings() { if (m_blnDoApplySettings) { - ui->deltaFrequency->setValue(abs(m_objChannelMarker.getCenterFrequency())); - ui->deltaFrequencyMinus->setChecked(m_objChannelMarker.getCenterFrequency() < 0); + ui->deltaFrequency->setValue(m_objChannelMarker.getCenterFrequency()); m_objChannelizer->configure(m_objChannelizer->getInputMessageQueue(), m_objChannelizer->getInputSampleRate(), // always use maximum available bandwidth @@ -606,24 +606,9 @@ void ATVDemodGUI::on_decimatorEnable_toggled(bool checked) applyRFSettings(); } -void ATVDemodGUI::on_deltaFrequency_changed(quint64 value) +void ATVDemodGUI::on_deltaFrequency_changed(qint64 value) { - if (ui->deltaFrequencyMinus->isChecked()) { - m_objChannelMarker.setCenterFrequency(-value); - } else { - m_objChannelMarker.setCenterFrequency(value); - } -} - -void ATVDemodGUI::on_deltaFrequencyMinus_toggled(bool minus) -{ - int deltaFrequency = m_objChannelMarker.getCenterFrequency(); - bool minusDelta = (deltaFrequency < 0); - - if (minus ^ minusDelta) // sign change - { - m_objChannelMarker.setCenterFrequency(-deltaFrequency); - } + m_objChannelMarker.setCenterFrequency(value); } void ATVDemodGUI::on_bfo_valueChanged(int value) diff --git a/plugins/channelrx/demodatv/atvdemodgui.h b/plugins/channelrx/demodatv/atvdemodgui.h index b5088b1e4..08e0b05a0 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.h +++ b/plugins/channelrx/demodatv/atvdemodgui.h @@ -81,8 +81,7 @@ private slots: void on_rfOppBW_valueChanged(int value); void on_rfFiltering_toggled(bool checked); void on_decimatorEnable_toggled(bool checked); - void on_deltaFrequency_changed(quint64 value); - void on_deltaFrequencyMinus_toggled(bool minus); + void on_deltaFrequency_changed(qint64 value); void on_bfo_valueChanged(int value); void on_fmDeviation_valueChanged(int value); void on_screenTabWidget_currentChanged(int index); diff --git a/plugins/channelrx/demodatv/atvdemodgui.ui b/plugins/channelrx/demodatv/atvdemodgui.ui index 54c1ecd73..2e8d6cb9f 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.ui +++ b/plugins/channelrx/demodatv/atvdemodgui.ui @@ -58,26 +58,20 @@ - - - Channel center frequency shift direction + + + + 16 + 0 + - - - - - :/plus.png - :/minus.png - - - - true + Df - + 0 @@ -1117,12 +1111,6 @@
gui/rollupwidget.h
1 - - ValueDial - QWidget -
gui/valuedial.h
- 1 -
ButtonSwitch QToolButton @@ -1146,6 +1134,12 @@
gui/glscopenggui.h
1
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +