1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

UDP sink: fixed bandwidth channel marker display

This commit is contained in:
f4exb 2017-11-21 22:46:39 +01:00
parent a57fdb8bd7
commit a1f6d29f03
4 changed files with 18 additions and 15 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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
{
applySettings();
}
ui->glSpectrum->setSampleRate(m_settings.m_inputSampleRate);
applySettings();
}
void UDPSinkGUI::on_resetUDPReadIndex_clicked()

View File

@ -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,