22 #include <QMessageBox> 26 #include "ui_xtrxinputgui.h" 39 m_deviceUISet(deviceUISet),
41 m_sampleRateMode(true),
43 m_lastEngineState(
DeviceAPI::StNotStarted),
44 m_doApplySettings(true),
45 m_forceSettings(true),
47 m_deviceStatusCounter(0)
53 float minF, maxF, stepF;
65 ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000);
76 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
192 ui->streamStatusLabel->setStyleSheet(
"QLabel { background-color : green; }");
194 ui->streamStatusLabel->setStyleSheet(
"QLabel { background-color : blue; }");
203 ui->streamStatusLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
211 ui->temperatureText->setText(tr(
"%1C").
arg(QString::number(report.
getTemperature(),
'f', 0)));
214 ui->gpsStatusLabel->setStyleSheet(
"QLabel { background-color : green; }");
216 ui->gpsStatusLabel->setStyleSheet(
"QLabel { background:rgb(48,48,48); }");
244 qDebug(
"XTRXInputGUI::handleInputMessages: DSPSignalNotification: SampleRate: %d, CenterFrequency: %llu", notif->
getSampleRate(), notif->
getCenterFrequency());
251 qDebug(
"XTRXInputGUI::handleInputMessages: MsgConfigureXTRX");
271 if (adcRate < 100000000) {
272 ui->adcRateLabel->setText(tr(
"%1k").
arg(QString::number(adcRate / 1000.0f,
'g', 5)));
274 ui->adcRateLabel->setText(tr(
"%1M").
arg(QString::number(adcRate / 1000000.0f,
'g', 5)));
287 float minF, maxF, stepF;
290 ui->sampleRate->blockSignals(
true);
294 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(60,60,60); }");
295 ui->sampleRateMode->setText(
"SR");
298 ui->sampleRate->setToolTip(
"Device to host sample rate (S/s)");
299 ui->deviceRateText->setToolTip(
"Baseband sample rate (S/s)");
301 ui->deviceRateText->setText(tr(
"%1k").
arg(QString::number(basebandSampleRate / 1000.0f,
'g', 5)));
305 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(50,50,50); }");
306 ui->sampleRateMode->setText(
"BB");
309 ui->sampleRate->setToolTip(
"Baseband sample rate (S/s)");
310 ui->deviceRateText->setToolTip(
"Device to host sample rate (S/s)");
314 ui->sampleRate->blockSignals(
false);
348 ui->gain->setEnabled(
true);
349 ui->lnaGain->setEnabled(
false);
350 ui->tiaGain->setEnabled(
false);
351 ui->pgaGain->setEnabled(
false);
355 ui->gain->setEnabled(
false);
356 ui->lnaGain->setEnabled(
true);
357 ui->tiaGain->setEnabled(
true);
358 ui->pgaGain->setEnabled(
true);
369 ui->ncoFrequency->setValueRange(
375 ui->ncoFrequency->blockSignals(
true);
376 ui->ncoFrequency->setToolTip(QString(
"NCO frequency shift in Hz (Range: +/- %1 kHz)").
arg(ncoHalfRange/1000));
378 ui->ncoFrequency->blockSignals(
false);
384 ui->centerFrequency->setToolTip(QString(
"Main center frequency in kHz (LO: %1 kHz)").
arg(centerFrequency/1000));
390 ui->centerFrequency->blockSignals(
true);
391 ui->centerFrequency->setValue(centerFrequency < 0 ? 0 : (
uint64_t) centerFrequency/1000);
392 ui->centerFrequency->blockSignals(
false);
397 int64_t centerFrequency = kHzValue*1000;
404 ui->centerFrequency->setToolTip(QString(
"Main center frequency in kHz (LO: %1 kHz)").
arg(centerFrequency/1000));
417 qDebug() <<
"XTRXInputGUI::updateHardware";
434 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
437 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
440 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
443 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
497 ui->record->setStyleSheet(
"QToolButton { background-color : red; }");
499 ui->record->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
552 if ((index <0) || (index > 5))
570 if ((index <0) || (index > 6)) {
590 ui->gain->setEnabled(
true);
591 ui->lnaGain->setEnabled(
false);
592 ui->tiaGain->setEnabled(
false);
593 ui->pgaGain->setEnabled(
false);
597 ui->gain->setEnabled(
false);
598 ui->lnaGain->setEnabled(
true);
599 ui->tiaGain->setEnabled(
true);
600 ui->pgaGain->setEnabled(
true);
Message * pop()
Pop message from queue.
const QString & getReverseAPIAddress() const
uint64_t getCenterFrequency() 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()
uint32_t getExtClockFeq() const
int getDevSampleRate() const
uint16_t getReverseAPIDeviceIndex() const
QString errorMessage()
Last error message from the device engine.
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
bool getGPSLocked() const
uint16_t getReverseAPIPort() const
static bool match(const Message *message)
float getTemperature() const
unsigned getLog2HardDecimInterp() const
int getSampleRate() const
void setCenterFrequency(qint64 frequency)
void setReverseAPIAddress(const QString &address)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void setReverseAPIPort(uint16_t port)
bool useReverseAPI() const
unsigned __int64 uint64_t