mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 00:14:49 -04:00
pluto: Get LO range from device
When updating firmware, the devices which have AD9364s on them, get reset to the default of a AD9363 (tuning range of 325 to 3800 MHz). SDRAngel assumes a AD9364, and the GUI allows you to set LO settings that the firmware doesn't support. This ensures that does not happen, by going out to the hardware, and querying the device to set the min/max limits on LO. Signed-off-by: Robin Getz <robin.getz@analog.com>
This commit is contained in:
@@ -438,10 +438,13 @@ void PlutoSDRInputGui::setSampleRateLimits()
|
||||
|
||||
void PlutoSDRInputGui::updateFrequencyLimits()
|
||||
{
|
||||
// values in kHz
|
||||
qint64 minLimit, maxLimit;
|
||||
// values should be in kHz
|
||||
qint64 deltaFrequency = m_settings.m_transverterMode ? m_settings.m_transverterDeltaFrequency/1000 : 0;
|
||||
qint64 minLimit = DevicePlutoSDR::loLowLimitFreq/1000 + deltaFrequency;
|
||||
qint64 maxLimit = DevicePlutoSDR::loHighLimitFreq/1000 + deltaFrequency;
|
||||
((PlutoSDRInput *) m_sampleSource)->getLORange(minLimit, maxLimit);
|
||||
|
||||
minLimit = minLimit/1000 + deltaFrequency;
|
||||
maxLimit = maxLimit/1000 + deltaFrequency;
|
||||
|
||||
minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
|
||||
maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
|
||||
|
||||
Reference in New Issue
Block a user