Adjust number of frequency digits display depending whether tranverter is enabled

pull/1479/head
Jon Beniston 2022-10-16 15:04:54 +01:00
rodzic da8e4d1a0b
commit afcf504886
5 zmienionych plików z 60 dodań i 25 usunięć

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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