kopia lustrzana https://github.com/f4exb/sdrangel
Merge pull request #1479 from srcejon/device_freq
Adjust number of frequency digits displayed depending whether tranverter is enabledpull/1481/head
commit
01a78e959e
|
@ -182,12 +182,19 @@ void AirspyGui::updateFrequencyLimits()
|
|||
qint64 minLimit = AirspyInput::loLowLimitFreq/1000 + deltaFrequency;
|
||||
qint64 maxLimit = AirspyInput::loHighLimitFreq/1000 + deltaFrequency;
|
||||
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
|
||||
if (m_settings.m_transverterMode)
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
else
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
|
||||
}
|
||||
qDebug("AirspyGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
|
||||
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
|
||||
void AirspyGui::displaySettings()
|
||||
|
|
|
@ -195,12 +195,19 @@ void AirspyHFGui::updateFrequencyLimits()
|
|||
break;
|
||||
}
|
||||
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
|
||||
if (m_settings.m_transverterMode)
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
else
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999 ? 999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999 ? 999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(6, minLimit, maxLimit);
|
||||
}
|
||||
qDebug("AirspyHFGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
|
||||
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
|
||||
void AirspyHFGui::displaySettings()
|
||||
|
|
|
@ -200,12 +200,19 @@ void RTLSDRGui::updateFrequencyLimits()
|
|||
qint64 minLimit = (m_settings.m_noModMode ? RTLSDRInput::frequencyLowRangeMin : RTLSDRInput::frequencyHighRangeMin) + deltaFrequency;
|
||||
qint64 maxLimit = (m_settings.m_noModMode ? RTLSDRInput::frequencyLowRangeMax : RTLSDRInput::frequencyHighRangeMax) + deltaFrequency;
|
||||
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
|
||||
if (m_settings.m_transverterMode)
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
else
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
|
||||
}
|
||||
qDebug("RTLSDRGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
|
||||
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
|
||||
void RTLSDRGui::displayGains()
|
||||
|
|
|
@ -237,12 +237,19 @@ void SDRPlayV3Gui::updateFrequencyLimits()
|
|||
qint64 minLimit = 1U + deltaFrequency;
|
||||
qint64 maxLimit = 2000000U + deltaFrequency;
|
||||
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
|
||||
if (m_settings.m_transverterMode)
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
else
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
|
||||
}
|
||||
qDebug("SDRPlayV3Gui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
|
||||
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
|
||||
void SDRPlayV3Gui::displaySettings()
|
||||
|
|
|
@ -256,12 +256,19 @@ void USRPInputGUI::updateFrequencyLimits()
|
|||
qint64 minLimit = minF/1000 + deltaFrequency;
|
||||
qint64 maxLimit = maxF/1000 + deltaFrequency;
|
||||
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
|
||||
if (m_settings.m_transverterMode)
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 999999999 ? 999999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 999999999 ? 999999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
else
|
||||
{
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
|
||||
ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
|
||||
}
|
||||
qDebug("USRPInputGUI::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
|
||||
|
||||
ui->centerFrequency->setValueRange(9, minLimit, maxLimit);
|
||||
}
|
||||
|
||||
void USRPInputGUI::handleInputMessages()
|
||||
|
|
Ładowanie…
Reference in New Issue