21 #include <QMessageBox> 25 #include "ui_limesdrinputgui.h" 38 m_deviceUISet(deviceUISet),
40 m_sampleRateMode(true),
42 m_lastEngineState(
DeviceAPI::StNotStarted),
43 m_doApplySettings(true),
44 m_forceSettings(true),
46 m_deviceStatusCounter(0)
64 ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000);
67 ui->lpFIR->setValueRange(5, 1U, 56000U);
75 ui->antenna->setItemText(2,
"NC");
76 ui->antenna->setItemText(3,
"Lo");
80 ui->antenna->setItemText(2,
"Lo");
81 ui->antenna->setItemText(3,
"Wi");
84 ui->hwDecimLabel->setText(QString::fromUtf8(
"H\u2193"));
85 ui->swDecimLabel->setText(QString::fromUtf8(
"S\u2193"));
97 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
207 ui->streamStatusLabel->setStyleSheet(
"QLabel { background-color : green; }");
209 ui->streamStatusLabel->setStyleSheet(
"QLabel { background-color : blue; }");
212 ui->streamLinkRateText->setText(tr(
"%1 MB/s").
arg(QString::number(report.
getLinkRate() / 1000000.0f,
'f', 3)));
215 ui->underrunLabel->setStyleSheet(
"QLabel { background-color : red; }");
217 ui->underrunLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
221 ui->overrunLabel->setStyleSheet(
"QLabel { background-color : red; }");
223 ui->overrunLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
227 ui->droppedLabel->setStyleSheet(
"QLabel { background-color : red; }");
229 ui->droppedLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
238 ui->streamStatusLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
246 ui->temperatureText->setText(tr(
"%1C").
arg(QString::number(report.
getTemperature(),
'f', 0)));
247 ui->gpioText->setText(tr(
"%1").
arg(report.
getGPIOPins(), 2, 16, QChar(
'0')).toUpper());
271 qint64 minLimit = minF/1000 + deltaFrequency;
272 qint64 maxLimit = maxF/1000 + deltaFrequency;
274 minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
275 maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
277 qDebug(
"LimeSDRInputGUI::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
279 ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
293 qDebug(
"LimeSDRInputGUI::handleInputMessages: DSPSignalNotification: SampleRate: %d, CenterFrequency: %llu", notif->
getSampleRate(), notif->
getCenterFrequency());
319 if (adcRate < 100000000) {
320 ui->adcRateLabel->setText(tr(
"%1k").
arg(QString::number(adcRate / 1000.0f,
'g', 5)));
322 ui->adcRateLabel->setText(tr(
"%1M").
arg(QString::number(adcRate / 1000000.0f,
'g', 5)));
338 ui->sampleRate->blockSignals(
true);
342 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(60,60,60); }");
343 ui->sampleRateMode->setText(
"SR");
346 ui->sampleRate->setToolTip(
"Device to host sample rate (S/s)");
347 ui->deviceRateText->setToolTip(
"Baseband sample rate (S/s)");
349 ui->deviceRateText->setText(tr(
"%1k").
arg(QString::number(basebandSampleRate / 1000.0f,
'g', 5)));
353 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(50,50,50); }");
354 ui->sampleRateMode->setText(
"BB");
357 ui->sampleRate->setToolTip(
"Baseband sample rate (S/s)");
358 ui->deviceRateText->setToolTip(
"Device to host sample rate (S/s)");
362 ui->sampleRate->blockSignals(
false);
402 ui->gain->setEnabled(
true);
403 ui->lnaGain->setEnabled(
false);
404 ui->tiaGain->setEnabled(
false);
405 ui->pgaGain->setEnabled(
false);
409 ui->gain->setEnabled(
false);
410 ui->lnaGain->setEnabled(
true);
411 ui->tiaGain->setEnabled(
true);
412 ui->pgaGain->setEnabled(
true);
423 ui->ncoFrequency->setValueRange(
429 ui->ncoFrequency->blockSignals(
true);
430 ui->ncoFrequency->setToolTip(QString(
"NCO frequency shift in Hz (Range: +/- %1 kHz)").
arg(ncoHalfRange/1000));
432 ui->ncoFrequency->blockSignals(
false);
438 ui->centerFrequency->setToolTip(QString(
"Main center frequency in kHz (LO: %1 kHz)").
arg(centerFrequency/1000));
444 ui->centerFrequency->blockSignals(
true);
445 ui->centerFrequency->setValue(centerFrequency < 0 ? 0 : (
uint64_t) centerFrequency/1000);
446 ui->centerFrequency->blockSignals(
false);
451 int64_t centerFrequency = kHzValue*1000;
458 ui->centerFrequency->setToolTip(QString(
"Main center frequency in kHz (LO: %1 kHz)").
arg(centerFrequency/1000));
471 qDebug() <<
"LimeSDRInputGUI::updateHardware";
488 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
491 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
494 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
497 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
551 ui->record->setStyleSheet(
"QToolButton { background-color : red; }");
553 ui->record->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
606 if ((index <0) || (index > 5))
616 if ((index <0) || (index > 6)) {
656 ui->gain->setEnabled(
true);
657 ui->lnaGain->setEnabled(
false);
658 ui->tiaGain->setEnabled(
false);
659 ui->pgaGain->setEnabled(
false);
663 ui->gain->setEnabled(
false);
664 ui->lnaGain->setEnabled(
true);
665 ui->tiaGain->setEnabled(
true);
666 ui->pgaGain->setEnabled(
true);
uint64_t getCenterFrequency() const
Message * pop()
Pop message from queue.
const QString & getReverseAPIAddress() const
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
bool isBuddyLeader() const
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
void setUseReverseAPI(bool useReverseAPI)
MessageQueue * getInputMessageQueue()
uint16_t getReverseAPIDeviceIndex() const
QString errorMessage()
Last error message from the device engine.
uint8_t getGPIOPins() const
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
int getLog2HardDecimInterp() const
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
uint16_t getReverseAPIPort() const
float getTemperature() const
static bool match(const Message *message)
int getSampleRate() const
void setCenterFrequency(qint64 frequency)
void setReverseAPIAddress(const QString &address)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void setReverseAPIPort(uint16_t port)
uint32_t getExtClockFeq() const
bool useReverseAPI() const
int getDevSampleRate() const
unsigned __int64 uint64_t