1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00

LimeSDR: clamp NCO lower limit to 0

This commit is contained in:
f4exb 2017-08-04 09:33:25 +02:00
parent c29d9623f4
commit 50c39b90a1
4 changed files with 8 additions and 4 deletions

View File

@ -287,8 +287,9 @@ void LimeSDROutputGUI::displaySettings()
void LimeSDROutputGUI::setNCODisplay()
{
int ncoHalfRange = (m_settings.m_devSampleRate * (1<<(m_settings.m_log2HardInterp)))/2;
int lowBoundary = std::max(0, (int) m_settings.m_centerFrequency - ncoHalfRange);
ui->ncoFrequency->setValueRange(7,
(m_settings.m_centerFrequency - ncoHalfRange)/1000,
lowBoundary/1000,
(m_settings.m_centerFrequency + ncoHalfRange)/1000); // frequency dial is in kHz
ui->ncoFrequency->setValue((m_settings.m_centerFrequency + m_settings.m_ncoFrequency)/1000);
}

View File

@ -30,7 +30,7 @@
const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
QString("LimeSDR Output"),
QString("3.5.0"),
QString("3.5.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -19,6 +19,8 @@
#include <QDebug>
#include <QMessageBox>
#include <algorithm>
#include "ui_limesdrinputgui.h"
#include "gui/colormapper.h"
#include "gui/glspectrum.h"
@ -313,8 +315,9 @@ void LimeSDRInputGUI::displaySettings()
void LimeSDRInputGUI::setNCODisplay()
{
int ncoHalfRange = (m_settings.m_devSampleRate * (1<<(m_settings.m_log2HardDecim)))/2;
int lowBoundary = std::max(0, (int) m_settings.m_centerFrequency - ncoHalfRange);
ui->ncoFrequency->setValueRange(7,
(m_settings.m_centerFrequency - ncoHalfRange)/1000,
lowBoundary/1000,
(m_settings.m_centerFrequency + ncoHalfRange)/1000); // frequency dial is in kHz
ui->ncoFrequency->setValue((m_settings.m_centerFrequency + m_settings.m_ncoFrequency)/1000);
}

View File

@ -31,7 +31,7 @@
const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = {
QString("LimeSDR Input"),
QString("3.5.0"),
QString("3.5.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,