1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00

LimeSDR: removed useless step information from range inspection functions

This commit is contained in:
f4exb 2018-03-14 11:03:22 +01:00
parent 5d7b56ffc7
commit c99693eacc
6 changed files with 26 additions and 32 deletions

View File

@ -462,31 +462,28 @@ std::size_t LimeSDROutput::getChannelIndex()
return m_deviceShared.m_channel; return m_deviceShared.m_channel;
} }
void LimeSDROutput::getLORange(float& minF, float& maxF, float& stepF) const void LimeSDROutput::getLORange(float& minF, float& maxF) const
{ {
lms_range_t range = m_deviceShared.m_deviceParams->m_loRangeTx; lms_range_t range = m_deviceShared.m_deviceParams->m_loRangeTx;
minF = range.min; minF = range.min;
maxF = range.max; maxF = range.max;
stepF = range.step; qDebug("LimeSDROutput::getLORange: min: %f max: %f", range.min, range.max);
qDebug("LimeSDROutput::getLORange: min: %f max: %f step: %f", range.min, range.max, range.step);
} }
void LimeSDROutput::getSRRange(float& minF, float& maxF, float& stepF) const void LimeSDROutput::getSRRange(float& minF, float& maxF) const
{ {
lms_range_t range = m_deviceShared.m_deviceParams->m_srRangeTx; lms_range_t range = m_deviceShared.m_deviceParams->m_srRangeTx;
minF = range.min; minF = range.min;
maxF = range.max; maxF = range.max;
stepF = range.step; qDebug("LimeSDROutput::getSRRange: min: %f max: %f", range.min, range.max);
qDebug("LimeSDROutput::getSRRange: min: %f max: %f step: %f", range.min, range.max, range.step);
} }
void LimeSDROutput::getLPRange(float& minF, float& maxF, float& stepF) const void LimeSDROutput::getLPRange(float& minF, float& maxF) const
{ {
lms_range_t range = m_deviceShared.m_deviceParams->m_lpfRangeTx; lms_range_t range = m_deviceShared.m_deviceParams->m_lpfRangeTx;
minF = range.min; minF = range.min;
maxF = range.max; maxF = range.max;
stepF = range.step; qDebug("LimeSDROutput::getLPRange: min: %f max: %f", range.min, range.max);
qDebug("LimeSDROutput::getLPRange: min: %f max: %f step: %f", range.min, range.max, range.step);
} }
uint32_t LimeSDROutput::getHWLog2Interp() const uint32_t LimeSDROutput::getHWLog2Interp() const

View File

@ -217,9 +217,9 @@ public:
QString& errorMessage); QString& errorMessage);
std::size_t getChannelIndex(); std::size_t getChannelIndex();
void getLORange(float& minF, float& maxF, float& stepF) const; void getLORange(float& minF, float& maxF) const;
void getSRRange(float& minF, float& maxF, float& stepF) const; void getSRRange(float& minF, float& maxF) const;
void getLPRange(float& minF, float& maxF, float& stepF) const; void getLPRange(float& minF, float& maxF) const;
uint32_t getHWLog2Interp() const; uint32_t getHWLog2Interp() const;
private: private:

View File

@ -42,17 +42,17 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
ui->setupUi(this); ui->setupUi(this);
float minF, maxF, stepF; float minF, maxF;
m_limeSDROutput->getLORange(minF, maxF, stepF); m_limeSDROutput->getLORange(minF, maxF);
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, ((uint32_t) minF)/1000, ((uint32_t) maxF)/1000); // frequency dial is in kHz ui->centerFrequency->setValueRange(7, ((uint32_t) minF)/1000, ((uint32_t) maxF)/1000); // frequency dial is in kHz
m_limeSDROutput->getSRRange(minF, maxF, stepF); m_limeSDROutput->getSRRange(minF, maxF);
ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow)); ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow));
ui->sampleRate->setValueRange(8, (uint32_t) minF, (uint32_t) maxF); ui->sampleRate->setValueRange(8, (uint32_t) minF, (uint32_t) maxF);
m_limeSDROutput->getLPRange(minF, maxF, stepF); m_limeSDROutput->getLPRange(minF, maxF);
ui->lpf->setColorMapper(ColorMapper(ColorMapper::GrayYellow)); ui->lpf->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000); ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000);

View File

@ -481,31 +481,28 @@ std::size_t LimeSDRInput::getChannelIndex()
return m_deviceShared.m_channel; return m_deviceShared.m_channel;
} }
void LimeSDRInput::getLORange(float& minF, float& maxF, float& stepF) const void LimeSDRInput::getLORange(float& minF, float& maxF) const
{ {
lms_range_t range = m_deviceShared.m_deviceParams->m_loRangeRx; lms_range_t range = m_deviceShared.m_deviceParams->m_loRangeRx;
minF = range.min; minF = range.min;
maxF = range.max; maxF = range.max;
stepF = range.step; qDebug("LimeSDRInput::getLORange: min: %f max: %f", range.min, range.max);
qDebug("LimeSDRInput::getLORange: min: %f max: %f step: %f", range.min, range.max, range.step);
} }
void LimeSDRInput::getSRRange(float& minF, float& maxF, float& stepF) const void LimeSDRInput::getSRRange(float& minF, float& maxF) const
{ {
lms_range_t range = m_deviceShared.m_deviceParams->m_srRangeRx; lms_range_t range = m_deviceShared.m_deviceParams->m_srRangeRx;
minF = range.min; minF = range.min;
maxF = range.max; maxF = range.max;
stepF = range.step; qDebug("LimeSDRInput::getSRRange: min: %f max: %f", range.min, range.max);
qDebug("LimeSDRInput::getSRRange: min: %f max: %f step: %f", range.min, range.max, range.step);
} }
void LimeSDRInput::getLPRange(float& minF, float& maxF, float& stepF) const void LimeSDRInput::getLPRange(float& minF, float& maxF) const
{ {
lms_range_t range = m_deviceShared.m_deviceParams->m_lpfRangeRx; lms_range_t range = m_deviceShared.m_deviceParams->m_lpfRangeRx;
minF = range.min; minF = range.min;
maxF = range.max; maxF = range.max;
stepF = range.step; qDebug("LimeSDRInput::getLPRange: min: %f max: %f", range.min, range.max);
qDebug("LimeSDRInput::getLPRange: min: %f max: %f step: %f", range.min, range.max, range.step);
} }
uint32_t LimeSDRInput::getHWLog2Decim() const uint32_t LimeSDRInput::getHWLog2Decim() const

View File

@ -238,9 +238,9 @@ public:
QString& errorMessage); QString& errorMessage);
std::size_t getChannelIndex(); std::size_t getChannelIndex();
void getLORange(float& minF, float& maxF, float& stepF) const; void getLORange(float& minF, float& maxF) const;
void getSRRange(float& minF, float& maxF, float& stepF) const; void getSRRange(float& minF, float& maxF) const;
void getLPRange(float& minF, float& maxF, float& stepF) const; void getLPRange(float& minF, float& maxF) const;
uint32_t getHWLog2Decim() const; uint32_t getHWLog2Decim() const;
private: private:

View File

@ -45,17 +45,17 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
ui->setupUi(this); ui->setupUi(this);
float minF, maxF, stepF; float minF, maxF;
m_limeSDRInput->getLORange(minF, maxF, stepF); m_limeSDRInput->getLORange(minF, maxF);
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, ((uint32_t) minF)/1000, ((uint32_t) maxF)/1000); // frequency dial is in kHz ui->centerFrequency->setValueRange(7, ((uint32_t) minF)/1000, ((uint32_t) maxF)/1000); // frequency dial is in kHz
m_limeSDRInput->getSRRange(minF, maxF, stepF); m_limeSDRInput->getSRRange(minF, maxF);
ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow)); ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow));
ui->sampleRate->setValueRange(8, (uint32_t) minF, (uint32_t) maxF); ui->sampleRate->setValueRange(8, (uint32_t) minF, (uint32_t) maxF);
m_limeSDRInput->getLPRange(minF, maxF, stepF); m_limeSDRInput->getLPRange(minF, maxF);
ui->lpf->setColorMapper(ColorMapper(ColorMapper::GrayYellow)); ui->lpf->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000); ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000);