mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-10 13:40:37 -04:00
RTL-SDR: fixed low sample rate setting
This commit is contained in:
parent
1bb36f6670
commit
e1bef01b96
plugins/samplesource/rtlsdr
@ -260,6 +260,7 @@ void RTLSDRGui::displaySettings()
|
||||
ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos);
|
||||
ui->checkBox->setChecked(m_settings.m_noModMode);
|
||||
ui->agc->setChecked(m_settings.m_agc);
|
||||
ui->lowSampleRate->setChecked(m_settings.m_lowSampleRate);
|
||||
}
|
||||
|
||||
void RTLSDRGui::sendSettings()
|
||||
@ -448,7 +449,9 @@ void RTLSDRGui::on_rfBW_changed(quint64 value)
|
||||
|
||||
void RTLSDRGui::on_lowSampleRate_toggled(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
m_settings.m_lowSampleRate = checked;
|
||||
|
||||
if (m_settings.m_lowSampleRate) {
|
||||
ui->sampleRate->setValueRange(7, RTLSDRInput::sampleRateLowRangeMin, RTLSDRInput::sampleRateLowRangeMax);
|
||||
} else {
|
||||
ui->sampleRate->setValueRange(7, RTLSDRInput::sampleRateHighRangeMin, RTLSDRInput::sampleRateHighRangeMax);
|
||||
|
@ -496,6 +496,11 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_settings.m_lowSampleRate != settings.m_lowSampleRate) || force)
|
||||
{
|
||||
m_settings.m_lowSampleRate = settings.m_lowSampleRate;
|
||||
}
|
||||
|
||||
if ((m_settings.m_rfBandwidth != settings.m_rfBandwidth) || force)
|
||||
{
|
||||
m_settings.m_rfBandwidth = settings.m_rfBandwidth;
|
||||
@ -608,6 +613,7 @@ int RTLSDRInput::webapiSettingsPutPatch(
|
||||
|
||||
void RTLSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RTLSDRSettings& settings)
|
||||
{
|
||||
qDebug("RTLSDRInput::webapiFormatDeviceSettings: m_lowSampleRate: %s", settings.m_lowSampleRate ? "true" : "false");
|
||||
response.getRtlSdrSettings()->setAgc(settings.m_agc ? 1 : 0);
|
||||
response.getRtlSdrSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||
response.getRtlSdrSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
|
Loading…
Reference in New Issue
Block a user