mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 05:11:49 -05:00
UDP sink: fixed bandwidth channel marker display
This commit is contained in:
parent
a57fdb8bd7
commit
a1f6d29f03
@ -419,7 +419,7 @@ void UDPSrcGUI::on_rfBandwidth_textEdited(const QString& arg1 __attribute__((unu
|
||||
bool ok;
|
||||
Real rfBandwidth = ui->rfBandwidth->text().toDouble(&ok);
|
||||
|
||||
if((!ok) || (rfBandwidth > m_settings.m_outputSampleRate))
|
||||
if ((!ok) || (rfBandwidth > m_settings.m_outputSampleRate))
|
||||
{
|
||||
m_settings.m_rfBandwidth = m_settings.m_outputSampleRate;
|
||||
ui->rfBandwidth->setText(QString("%1").arg(m_settings.m_rfBandwidth, 0));
|
||||
@ -458,10 +458,8 @@ void UDPSrcGUI::on_applyBtn_clicked()
|
||||
{
|
||||
if (m_rfBandwidthChanged)
|
||||
{
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.setBandwidth((int) m_settings.m_rfBandwidth);
|
||||
m_rfBandwidthChanged = false;
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
ui->glSpectrum->setSampleRate(m_settings.m_outputSampleRate);
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
|
||||
QString("UDP Channel Source"),
|
||||
QString("3.8.2"),
|
||||
QString("3.8.5"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -195,11 +195,11 @@ void UDPSinkGUI::displaySettings()
|
||||
{
|
||||
m_channelMarker.blockSignals(true);
|
||||
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
|
||||
m_channelMarker.setBandwidth((int)m_settings.m_rfBandwidth);
|
||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
||||
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
|
||||
m_channelMarker.setUDPAddress(m_settings.m_udpAddress);
|
||||
m_channelMarker.blockSignals(false);
|
||||
m_channelMarker.setUDPReceivePort(m_settings.m_udpPort); // activate signal on the last setting only
|
||||
m_channelMarker.blockSignals(false);
|
||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
this->setWindowTitle(m_channelMarker.getTitle());
|
||||
@ -295,13 +295,18 @@ void UDPSinkGUI::on_rfBandwidth_textEdited(const QString& arg1 __attribute__((un
|
||||
bool ok;
|
||||
Real rfBandwidth = ui->rfBandwidth->text().toDouble(&ok);
|
||||
|
||||
if ((!ok) || (rfBandwidth > m_settings.m_inputSampleRate)) {
|
||||
if ((!ok) || (rfBandwidth > m_settings.m_inputSampleRate))
|
||||
{
|
||||
m_settings.m_rfBandwidth = m_settings.m_inputSampleRate;
|
||||
ui->rfBandwidth->setText(QString("%1").arg(m_settings.m_rfBandwidth, 0));
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settings.m_rfBandwidth = rfBandwidth;
|
||||
}
|
||||
|
||||
m_rfBandwidthChanged = true;
|
||||
|
||||
ui->applyBtn->setEnabled(true);
|
||||
ui->applyBtn->setStyleSheet("QPushButton { background-color : green; }");
|
||||
}
|
||||
@ -384,13 +389,13 @@ void UDPSinkGUI::on_applyBtn_clicked()
|
||||
{
|
||||
if (m_rfBandwidthChanged)
|
||||
{
|
||||
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth); // will call apply settings
|
||||
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
|
||||
m_rfBandwidthChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
ui->glSpectrum->setSampleRate(m_settings.m_inputSampleRate);
|
||||
|
||||
applySettings();
|
||||
}
|
||||
}
|
||||
|
||||
void UDPSinkGUI::on_resetUDPReadIndex_clicked()
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = {
|
||||
QString("UDP Channel Sink"),
|
||||
QString("3.8.4"),
|
||||
QString("3.8.5"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
Loading…
Reference in New Issue
Block a user