20 #include <QMessageBox> 32 #include "ui_plutosdroutputgui.h" 37 m_deviceUISet(deviceUISet),
39 m_sampleRateMode(true),
40 m_forceSettings(true),
43 m_deviceCenterFrequency(0),
44 m_lastEngineState(
DeviceAPI::StNotStarted),
45 m_doApplySettings(true),
59 quint32 minLimit, maxLimit;
61 ui->lpf->setValueRange(5, minLimit/1000, maxLimit/1000);
64 ui->lpFIR->setValueRange(5, 1U, 56000U);
66 ui->swInterpLabel->setText(QString::fromUtf8(
"S\u2191"));
67 ui->lpFIRInterpolationLabel->setText(QString::fromUtf8(
"\u2191"));
70 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
199 ui->loPPMText->setText(QString(
"%1").
arg(QString::number(value/10.0,
'f', 1)));
237 ui->lpFIRInterpolation->setEnabled(checked);
238 ui->lpFIRGain->setEnabled(checked);
263 ui->attText->setText(QString(
"%1 dB").
arg(QString::number(value*0.25,
'f', 2)));
292 ui->sampleRate->blockSignals(
true);
296 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(60,60,60); }");
297 ui->sampleRateMode->setText(
"SR");
300 ui->sampleRate->setToolTip(
"Host to device sample rate (S/s)");
301 ui->deviceRateText->setToolTip(
"Baseband sample rate (S/s)");
303 ui->deviceRateText->setText(tr(
"%1k").
arg(QString::number(basebandSampleRate / 1000.0f,
'g', 5)));
307 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(50,50,50); }");
308 ui->sampleRateMode->setText(
"BB");
311 ui->sampleRate->setToolTip(
"Baseband sample rate (S/s)");
312 ui->deviceRateText->setToolTip(
"Host to device sample rate (S/s)");
316 ui->sampleRate->blockSignals(
false);
360 qDebug() <<
"PlutoSDROutputGUI::updateHardware";
382 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
385 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
388 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
391 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
405 if (dacRate < 100000000) {
406 ui->dacRateLabel->setText(tr(
"%1k").
arg(QString::number(dacRate / 1000.0f,
'g', 5)));
408 ui->dacRateLabel->setText(tr(
"%1M").
arg(QString::number(dacRate / 1000000.0f,
'g', 5)));
416 ui->rssiText->setText(tr(
"-%1").
arg(QString::fromStdString(rssiStr)));
435 ui->lpFIR->setValueRange(5, (
int(low)/1000)+1, (
int(high)/1000)+1);
448 qint64 minLimit, maxLimit;
453 minLimit = minLimit/1000 + deltaFrequency;
454 maxLimit = maxLimit/1000 + deltaFrequency;
456 minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
457 maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
459 qDebug(
"PlutoSDRInputGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
461 ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
470 qDebug(
"PlutoSDROutputGUI::handleInputMessages: message: %s", message->
getIdentifier());
477 qDebug(
"PlutoSDROutputGUI::handleInputMessages: DSPSignalNotification: SampleRate: %d, CenterFrequency: %llu", notif->
getSampleRate(), notif->
getCenterFrequency());
qint32 m_LOppmTenths
XO correction.
DeviceUISet * m_deviceUISet
QString m_reverseAPIAddress
Message * pop()
Pop message from queue.
void openDeviceSettingsDialog(const QPoint &p)
const QString & getReverseAPIAddress() const
static const uint32_t srHighLimitFreq
Device sample rate higher limit in S/s.
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
static const float firBWHighLimitFactor
Factor by which the FIR working sample rate is multiplied to yield bandwidth higher limit...
uint32_t getLpfFiRlog2IntDec() const
void on_centerFrequency_changed(quint64 value)
bool isBuddyLeader() const
void setUseReverseAPI(bool useReverseAPI)
bool isLpfFirEnable() const
virtual bool handleMessage(const Message &message)
void on_sampleRateMode_toggled(bool checked)
uint16_t getReverseAPIDeviceIndex() const
void updateSampleRateAndFrequency()
void setSampleRateLimits()
qint32 m_att
"hardware" attenuation in dB fourths
void sendSettings(bool forceSettings=false)
QString errorMessage()
Last error message from the device engine.
void on_transverter_clicked()
DeviceSampleSink * getSampleSink()
Return pointer to the device sample sink (single Tx) or nullptr.
virtual QByteArray serialize() const
void on_swInterp_currentIndexChanged(int index)
static const uint32_t srLowLimitFreq
Device sample rate lower limit in S/s.
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.
uint16_t m_reverseAPIDeviceIndex
MessageQueue * getInputMessageQueue()
MessageQueue m_inputMessageQueue
void updateFrequencyLimits()
void on_att_valueChanged(int value)
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
bool deserialize(const QByteArray &data)
virtual void resetToDefaults()
uint16_t getReverseAPIPort() const
virtual QString getName() const
uint16_t m_reverseAPIPort
bool m_lpfFIREnable
enable digital lowpass FIR filter
void on_lpFIR_changed(quint64 value)
QByteArray serialize() const
void on_lpFIRGain_currentIndexChanged(int index)
static bool match(const Message *message)
uint32_t getLpfFirbw() const
void on_lpFIREnable_toggled(bool checked)
void on_lpf_changed(quint64 value)
int32_t getLoPPMTenths() const
quint32 m_lpfFIRlog2Interp
digital lowpass FIR filter log2 of interpolation factor (0..2)
PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget *parent=0)
virtual qint64 getCenterFrequency() const
void handleInputMessages()
virtual void setName(const QString &name)
Ui::PlutoSDROutputGUI * ui
quint64 m_devSampleRate
Host interface sample rate.
bool getStartStop() const
virtual ~PlutoSDROutputGUI()
int getSampleRate() const
static const float firBWLowLimitFactor
Factor by which the FIR working sample rate is multiplied to yield bandwidth lower limit...
void setCenterFrequency(qint64 frequency)
virtual const char * getIdentifier() const
PlutoSDROutputSettings m_settings
void on_loPPM_valueChanged(int value)
void setReverseAPIAddress(const QString &address)
virtual void setCenterFrequency(qint64 centerFrequency)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void on_antenna_currentIndexChanged(int index)
void on_lpFIRInterpolation_currentIndexChanged(int index)
void setReverseAPIPort(uint16_t port)
qint64 m_transverterDeltaFrequency
quint64 m_deviceCenterFrequency
Center frequency in device.
void blockApplySettings(bool block)
static MsgStartStop * create(bool startStop)
bool useReverseAPI() const
quint64 m_centerFrequency
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
bool m_sampleRateMode
true: device, false: base band sample rate update mode
DeviceSampleSink * m_sampleSink
virtual bool deserialize(const QByteArray &data)
uint64_t getDevSampleRate() const
void on_sampleRate_changed(quint64 value)
void on_startStop_toggled(bool checked)