diff --git a/plugins/channelrx/udpsrc/udpsrc.cpp b/plugins/channelrx/udpsrc/udpsrc.cpp index 254920d32..d446f54be 100644 --- a/plugins/channelrx/udpsrc/udpsrc.cpp +++ b/plugins/channelrx/udpsrc/udpsrc.cpp @@ -30,6 +30,7 @@ MESSAGE_CLASS_DEFINITION(UDPSrc::MsgUDPSrcSpectrum, Message) UDPSrc::UDPSrc(MessageQueue* uiMessageQueue, UDPSrcGUI* udpSrcGUI, BasebandSampleSink* spectrum) : m_udpPort(9999), + m_gain(1.0), m_audioActive(false), m_audioStereo(false), m_volume(20), @@ -65,7 +66,6 @@ UDPSrc::UDPSrc(MessageQueue* uiMessageQueue, UDPSrcGUI* udpSrcGUI, BasebandSampl m_last = 0; m_this = 0; m_scale = 0; - m_boost = 0; m_magsq = 0; UDPFilter = new fftfilt(0.0, (m_rfBandwidth / 2.0) / m_outputSampleRate, udpBlockSize); @@ -116,7 +116,7 @@ void UDPSrc::configure(MessageQueue* messageQueue, void UDPSrc::configureImmediate(MessageQueue* messageQueue, bool audioActive, bool audioStereo, - int boost, + Real boost, int volume) { Message* cmd = MsgUDPSrcConfigureImmediate::create( @@ -141,7 +141,6 @@ void UDPSrc::feed(const SampleVector::const_iterator& begin, const SampleVector: m_sampleBuffer.clear(); m_settingsMutex.lock(); - int rescale = (1 << m_boost); for(SampleVector::const_iterator it = begin; it < end; ++it) { @@ -150,8 +149,8 @@ void UDPSrc::feed(const SampleVector::const_iterator& begin, const SampleVector: if(m_interpolator.decimate(&m_sampleDistanceRemain, c, &ci)) { - m_magsq = ((ci.real()*ci.real() + ci.imag()*ci.imag())*rescale*rescale) / (1<<30); - Sample s(ci.real() * rescale, ci.imag() * rescale); + m_magsq = ((ci.real()*ci.real() + ci.imag()*ci.imag())*m_gain*m_gain) / (1<<30); + Sample s(ci.real() * m_gain, ci.imag() * m_gain); m_sampleBuffer.push_back(s); m_sampleDistanceRemain += m_inputSampleRate / m_outputSampleRate; @@ -298,9 +297,9 @@ bool UDPSrc::handleMessage(const Message& cmd) m_audioStereo = cfg.getAudioStereo(); } - if (cfg.getBoost() != m_boost) + if (cfg.getGain() != m_gain) { - m_boost = cfg.getBoost(); + m_gain = cfg.getGain(); } if (cfg.getVolume() != m_volume) @@ -313,7 +312,7 @@ bool UDPSrc::handleMessage(const Message& cmd) qDebug() << "UDPSrc::handleMessage: MsgUDPSrcConfigureImmediate: " << " m_audioActive: " << m_audioActive << " m_audioStereo: " << m_audioStereo - << " m_boost: " << m_boost + << " m_gain: " << m_gain << " m_volume: " << m_volume; return true; @@ -377,7 +376,6 @@ bool UDPSrc::handleMessage(const Message& cmd) qDebug() << "UDPSrc::handleMessage: MsgUDPSrcConfigure: m_sampleFormat: " << m_sampleFormat << " m_outputSampleRate: " << m_outputSampleRate << " m_rfBandwidth: " << m_rfBandwidth - << " m_boost: " << m_boost << " m_udpAddressStr: " << m_udpAddressStr << " m_udpPort: " << m_udpPort << " m_audioPort: " << m_audioPort; diff --git a/plugins/channelrx/udpsrc/udpsrc.h b/plugins/channelrx/udpsrc/udpsrc.h index 9403b552e..a957a36c4 100644 --- a/plugins/channelrx/udpsrc/udpsrc.h +++ b/plugins/channelrx/udpsrc/udpsrc.h @@ -70,7 +70,7 @@ public: void configureImmediate(MessageQueue* messageQueue, bool audioActive, bool audioStereo, - int boost, + Real gain, int volume); void setSpectrum(MessageQueue* messageQueue, bool enabled); double getMagSq() const { return m_magsq; } @@ -147,7 +147,7 @@ protected: MESSAGE_CLASS_DECLARATION public: - int getBoost() const { return m_boost; } + Real getGain() const { return m_gain; } int getVolume() const { return m_volume; } bool getAudioActive() const { return m_audioActive; } bool getAudioStereo() const { return m_audioStereo; } @@ -166,7 +166,7 @@ protected: } private: - int m_boost; + Real m_gain; int m_volume; bool m_audioActive; bool m_audioStereo; @@ -174,10 +174,10 @@ protected: MsgUDPSrcConfigureImmediate( bool audioActive, bool audioStereo, - int boost, + Real gain, int volume) : Message(), - m_boost(boost), + m_gain(gain), m_volume(volume), m_audioActive(audioActive), m_audioStereo(audioStereo) @@ -216,7 +216,7 @@ protected: QString m_udpAddressStr; quint16 m_udpPort; quint16 m_audioPort; - int m_boost; + Real m_gain; bool m_audioActive; bool m_audioStereo; int m_volume; diff --git a/plugins/channelrx/udpsrc/udpsrcgui.cpp b/plugins/channelrx/udpsrc/udpsrcgui.cpp index 11338fc17..a804251df 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.cpp +++ b/plugins/channelrx/udpsrc/udpsrcgui.cpp @@ -77,7 +77,7 @@ void UDPSrcGUI::resetToDefaults() ui->udpPort->setText("9999"); ui->audioPort->setText("9999"); ui->spectrumGUI->resetToDefaults(); - ui->boost->setValue(1); + ui->gain->setValue(10); ui->volume->setValue(20); ui->audioActive->setChecked(false); ui->audioStereo->setChecked(false); @@ -97,7 +97,7 @@ QByteArray UDPSrcGUI::serialize() const s.writeReal(5, m_rfBandwidth); s.writeS32(6, m_udpPort); s.writeBlob(7, ui->spectrumGUI->serialize()); - s.writeS32(8, (qint32)m_boost); + s.writeS32(8, ui->gain->value()); s.writeS32(9, m_channelMarker.getCenterFrequency()); s.writeString(10, m_udpAddress); s.writeBool(11, m_audioActive); @@ -171,8 +171,9 @@ bool UDPSrcGUI::deserialize(const QByteArray& data) ui->udpPort->setText(QString("%1").arg(s32tmp)); d.readBlob(7, &bytetmp); ui->spectrumGUI->deserialize(bytetmp); - d.readS32(8, &s32tmp, 1); - ui->boost->setValue(s32tmp); + d.readS32(16, &s32tmp, 10); + ui->gain->setValue(s32tmp); + ui->gainText->setText(tr("%1").arg(s32tmp/10.0, 0, 'f', 1)); d.readS32(9, &s32tmp, 0); m_channelMarker.setCenterFrequency(s32tmp); d.readString(10, &strtmp, "127.0.0.1"); @@ -181,6 +182,7 @@ bool UDPSrcGUI::deserialize(const QByteArray& data) ui->audioActive->setChecked(booltmp); d.readS32(12, &s32tmp, 20); ui->volume->setValue(s32tmp); + ui->volumeText->setText(QString("%1").arg(s32tmp)); d.readS32(13, &s32tmp, 9998); ui->audioPort->setText(QString("%1").arg(s32tmp)); d.readBool(14, &booltmp, false); @@ -215,9 +217,14 @@ void UDPSrcGUI::channelMarkerChanged() void UDPSrcGUI::tick() { - double powDb = CalcDb::dbPower(m_udpSrc->getMagSq()); - m_channelPowerDbAvg.feed(powDb); - ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1)); + if (m_tickCount % 4 == 0) + { + m_channelPowerAvg.feed(m_udpSrc->getMagSq()); + double powDb = CalcDb::dbPower(m_channelPowerAvg.average()); + ui->channelPower->setText(QString::number(powDb, 'f', 1)); + } + + m_tickCount++; } UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) : @@ -227,8 +234,9 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* m_deviceAPI(deviceAPI), m_udpSrc(0), m_channelMarker(this), - m_channelPowerDbAvg(40,0), - m_boost(1), + m_channelPowerAvg(4, 1e-10), + m_tickCount(0), + m_gain(1.0), m_volume(20), m_basicSettingsShown(false), m_doApplySettings(true) @@ -273,6 +281,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum); + displaySettings(); applySettingsImmediate(); applySettings(); } @@ -294,19 +303,25 @@ void UDPSrcGUI::blockApplySettings(bool block) m_doApplySettings = !block; } +void UDPSrcGUI::displaySettings() +{ + ui->gainText->setText(tr("%1").arg(ui->gain->value()/10.0, 0, 'f', 1)); + ui->volumeText->setText(QString("%1").arg(ui->volume->value())); +} + void UDPSrcGUI::applySettingsImmediate() { if (m_doApplySettings) { m_audioActive = ui->audioActive->isChecked(); m_audioStereo = ui->audioStereo->isChecked(); - m_boost = ui->boost->value(); + m_gain = ui->gain->value() / 10.0; m_volume = ui->volume->value(); m_udpSrc->configureImmediate(m_udpSrc->getInputMessageQueue(), m_audioActive, m_audioStereo, - m_boost, + m_gain, m_volume); } } @@ -355,8 +370,6 @@ void UDPSrcGUI::applySettings() fmDeviation = 2500; } - int boost = ui->boost->value(); - setTitleColor(m_channelMarker.getColor()); ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency()); ui->sampleRate->setText(QString("%1").arg(outputSampleRate, 0)); @@ -365,7 +378,6 @@ void UDPSrcGUI::applySettings() ui->udpPort->setText(QString("%1").arg(udpPort)); ui->audioPort->setText(QString("%1").arg(audioPort)); ui->fmDeviation->setText(QString("%1").arg(fmDeviation)); - ui->boost->setValue(boost); m_channelMarker.disconnect(this, SLOT(channelMarkerChanged())); m_channelMarker.setBandwidth((int)rfBandwidth); connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged())); @@ -423,7 +435,6 @@ void UDPSrcGUI::applySettings() m_fmDeviation = fmDeviation; m_udpPort = udpPort; m_audioPort = audioPort; - m_boost = boost; m_udpSrc->configure(m_udpSrc->getInputMessageQueue(), sampleFormat, @@ -499,10 +510,9 @@ void UDPSrcGUI::on_audioStereo_toggled(bool stereo __attribute__((unused))) applySettingsImmediate(); } -void UDPSrcGUI::on_boost_valueChanged(int value) +void UDPSrcGUI::on_gain_valueChanged(int value) { - ui->boost->setValue(value); - ui->boostText->setText(QString("%1").arg(value)); + ui->gainText->setText(tr("%1").arg(value/10.0, 0, 'f', 1)); applySettingsImmediate(); } diff --git a/plugins/channelrx/udpsrc/udpsrcgui.h b/plugins/channelrx/udpsrc/udpsrcgui.h index cd3978cb1..cca6050d5 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.h +++ b/plugins/channelrx/udpsrc/udpsrcgui.h @@ -72,7 +72,7 @@ private slots: void on_applyBtn_clicked(); void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDoubleClicked(); - void on_boost_valueChanged(int value); + void on_gain_valueChanged(int value); void on_volume_valueChanged(int value); void tick(); @@ -82,14 +82,15 @@ private: DeviceSourceAPI* m_deviceAPI; UDPSrc* m_udpSrc; ChannelMarker m_channelMarker; - MovingAverage m_channelPowerDbAvg; + MovingAverage m_channelPowerAvg; + uint32_t m_tickCount; // settings UDPSrc::SampleFormat m_sampleFormat; Real m_outputSampleRate; Real m_rfBandwidth; int m_fmDeviation; - int m_boost; + Real m_gain; bool m_audioActive; bool m_audioStereo; int m_volume; @@ -110,6 +111,7 @@ private: void blockApplySettings(bool block); void applySettings(); void applySettingsImmediate(); + void displaySettings(); void leaveEvent(QEvent*); void enterEvent(QEvent*); diff --git a/plugins/channelrx/udpsrc/udpsrcgui.ui b/plugins/channelrx/udpsrc/udpsrcgui.ui index 2d374c474..9e9649f21 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.ui +++ b/plugins/channelrx/udpsrc/udpsrcgui.ui @@ -6,7 +6,7 @@ 0 0 - 316 + 351 355 @@ -36,13 +36,13 @@ 2 2 - 312 + 340 142 - 312 + 340 0 @@ -65,13 +65,6 @@ 3 - - - - Format - - - @@ -89,14 +82,23 @@ + + + 40 + 0 + + - Channel power + Channel output power (dB) Qt::LeftToRight - 0.0 + -100.0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -109,47 +111,6 @@ - - - - Rate (Hz) - - - - - - - - - Boost - - - - - - - Signal boost factor - - - 3 - - - 1 - - - Qt::Horizontal - - - - - - - 0 - - - - - @@ -277,7 +238,7 @@ - + @@ -321,29 +282,12 @@ - - - - RF BW (Hz) - - - - - - - Signal bandwidth - - - 32000 - - - - + - FMd (Hz) + FMd @@ -395,67 +339,7 @@ - - - - Samples rate - - - 48000 - - - - - - - Samples format - - - 0 - - - - S16LE I/Q - - - - - S16LE NFM - - - - - S16LE NFM Mono - - - - - S16LE LSB - - - - - S16LE USB - - - - - S16LE LSB Mono - - - - - S16LE USB Mono - - - - - S16LE AM Mono - - - - - + @@ -479,7 +363,7 @@ - + @@ -509,9 +393,176 @@ + + + 18 + 0 + + 20 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + 30 + 16777215 + + + + Fmt + + + + + + + Samples format + + + 0 + + + + S16LE I/Q + + + + + S16LE NFM + + + + + S16LE NFM Mono + + + + + S16LE LSB + + + + + S16LE USB + + + + + S16LE LSB Mono + + + + + S16LE USB Mono + + + + + S16LE AM Mono + + + + + + + + + + + + SRout + + + + + + + Output sample rate (S/s) + + + 48000 + + + + + + + + + + + RFBW + + + + + + + Signal bandwidth (Hz) + + + 32000 + + + + + + + + + + + Gain + + + + + + + Output linear gain + + + 100 + + + 1 + + + 10 + + + Qt::Horizontal + + + + + + + + 28 + 0 + + + + Output linear gain + + + 00.0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + @@ -601,11 +652,6 @@ 1 - - sampleFormat - sampleRate - rfBandwidth - diff --git a/plugins/channeltx/udpsink/udpsink.cpp b/plugins/channeltx/udpsink/udpsink.cpp index afd08ecd5..b227bf2cd 100644 --- a/plugins/channeltx/udpsink/udpsink.cpp +++ b/plugins/channeltx/udpsink/udpsink.cpp @@ -128,8 +128,8 @@ void UDPSink::modulateSample() if (m_squelchOpen) { - m_modSample.real(s.m_real * m_running.m_volume); - m_modSample.imag(s.m_imag * m_running.m_volume); + m_modSample.real(s.m_real * m_running.m_gain); + m_modSample.imag(s.m_imag * m_running.m_gain); calculateLevel(m_modSample); } else @@ -230,7 +230,7 @@ bool UDPSink::handleMessage(const Message& cmd) m_config.m_udpAddressStr = cfg.getUDPAddress(); m_config.m_udpPort = cfg.getUDPPort(); m_config.m_channelMute = cfg.getChannelMute(); - m_config.m_volume = cfg.getVolume(); + m_config.m_gain = cfg.getGain(); m_config.m_squelch = CalcDb::powerFromdB(cfg.getSquelchDB()); apply(cfg.getForce()); @@ -243,7 +243,7 @@ bool UDPSink::handleMessage(const Message& cmd) << " m_udpAddressStr: " << m_config.m_udpAddressStr << " m_udpPort: " << m_config.m_udpPort << " m_channelMute: " << m_config.m_channelMute - << " m_volume: " << m_config.m_volume + << " m_gain: " << m_config.m_gain << " squelchDB: " << cfg.getSquelchDB() << " m_squelch: " << m_config.m_squelch; @@ -330,7 +330,7 @@ void UDPSink::configure(MessageQueue* messageQueue, QString& udpAddress, int udpPort, bool channelMute, - Real volume, + Real gain, Real squelchDB, bool force) { @@ -341,7 +341,7 @@ void UDPSink::configure(MessageQueue* messageQueue, udpAddress, udpPort, channelMute, - volume, + gain, squelchDB, force); messageQueue->push(cmd); diff --git a/plugins/channeltx/udpsink/udpsink.h b/plugins/channeltx/udpsink/udpsink.h index 440c49067..bf31d44b8 100644 --- a/plugins/channeltx/udpsink/udpsink.h +++ b/plugins/channeltx/udpsink/udpsink.h @@ -67,7 +67,7 @@ public: QString& udpAddress, int udpPort, bool channelMute, - Real volume, + Real gain, Real squelchDB, bool force = false); void setSpectrum(MessageQueue* messageQueue, bool enabled); @@ -93,7 +93,7 @@ private: const QString& getUDPAddress() const { return m_udpAddress; } int getUDPPort() const { return m_udpPort; } bool getChannelMute() const { return m_channelMute; } - Real getVolume() const { return m_volume; } + Real getGain() const { return m_gain; } Real getSquelchDB() const { return m_squelchDB; } bool getForce() const { return m_force; } @@ -105,7 +105,7 @@ private: QString& udpAddress, int udpPort, bool channelMute, - Real volume, + Real gain, Real squelchDB, bool force) { @@ -116,7 +116,7 @@ private: udpAddress, udpPort, channelMute, - volume, + gain, squelchDB, force); } @@ -129,7 +129,7 @@ private: QString m_udpAddress; int m_udpPort; bool m_channelMute; - Real m_volume; + Real m_gain; Real m_squelchDB; bool m_force; @@ -140,7 +140,7 @@ private: QString& udpAddress, int udpPort, bool channelMute, - Real volume, + Real gain, Real squelchDB, bool force) : Message(), @@ -151,7 +151,7 @@ private: m_udpAddress(udpAddress), m_udpPort(udpPort), m_channelMute(channelMute), - m_volume(volume), + m_gain(gain), m_squelchDB(squelchDB), m_force(force) { } @@ -186,7 +186,7 @@ private: Real m_rfBandwidth; int m_fmDeviation; bool m_channelMute; - Real m_volume; + Real m_gain; Real m_squelch; //!< squared magnitude QString m_udpAddressStr; @@ -201,7 +201,7 @@ private: m_rfBandwidth(12500), m_fmDeviation(1.0), m_channelMute(false), - m_volume(1.0), + m_gain(1.0), m_squelch(-50.0), m_udpAddressStr("127.0.0.1"), m_udpPort(9999) diff --git a/plugins/channeltx/udpsink/udpsinkgui.cpp b/plugins/channeltx/udpsink/udpsinkgui.cpp index ea5172c94..db188e677 100644 --- a/plugins/channeltx/udpsink/udpsinkgui.cpp +++ b/plugins/channeltx/udpsink/udpsinkgui.cpp @@ -71,7 +71,7 @@ void UDPSinkGUI::resetToDefaults() ui->udpAddress->setText("127.0.0.1"); ui->udpPort->setText("9999"); ui->spectrumGUI->resetToDefaults(); - ui->volume->setValue(10); + ui->gain->setValue(10); blockApplySettings(false); applySettings(); @@ -89,7 +89,7 @@ QByteArray UDPSinkGUI::serialize() const s.writeBlob(7, ui->spectrumGUI->serialize()); s.writeS32(8, m_channelMarker.getCenterFrequency()); s.writeString(9, m_udpAddress); - s.writeS32(10, ui->volume->value()); + s.writeS32(10, ui->gain->value()); s.writeS32(11, m_fmDeviation); s.writeU32(12, m_channelMarker.getColor().rgb()); s.writeString(13, m_channelMarker.getTitle()); @@ -166,8 +166,8 @@ bool UDPSinkGUI::deserialize(const QByteArray& data) d.readString(9, &strtmp, "127.0.0.1"); ui->udpAddress->setText(strtmp); d.readS32(10, &s32tmp, 10); - ui->volume->setValue(s32tmp); - ui->volumeText->setText(tr("%1").arg(s32tmp/10.0, 0, 'f', 1)); + ui->gain->setValue(s32tmp); + ui->gainText->setText(tr("%1").arg(s32tmp/10.0, 0, 'f', 1)); d.readS32(11, &s32tmp, 2500); ui->fmDeviation->setText(QString("%1").arg(s32tmp)); @@ -218,9 +218,9 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* ui(new Ui::UDPSinkGUI), m_pluginAPI(pluginAPI), m_deviceAPI(deviceAPI), - m_channelPowerAvg(20, 1e-10), - m_inPowerAvg(50, 1e-10), - m_powDisplayCount(0), + m_channelPowerAvg(4, 1e-10), + m_inPowerAvg(4, 1e-10), + m_tickCount(0), m_channelMarker(this), m_basicSettingsShown(false), m_doApplySettings(true) @@ -265,6 +265,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum); + displaySettings(); applySettings(true); connect(m_udpSink->getOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); @@ -395,7 +396,7 @@ void UDPSinkGUI::applySettings(bool force) m_udpAddress, udpPort, ui->channelMute->isChecked(), - ui->volume->value() / 10.0f, + ui->gain->value() / 10.0f, ui->squelch->value() * 1.0f, force); @@ -405,7 +406,7 @@ void UDPSinkGUI::applySettings(bool force) void UDPSinkGUI::displaySettings() { - ui->volumeText->setText(tr("%1").arg(ui->volume->value()/10.0, 0, 'f', 1)); + ui->gainText->setText(tr("%1").arg(ui->gain->value()/10.0, 0, 'f', 1)); ui->squelchText->setText(tr("%1").arg(ui->squelch->value()*1.0, 0, 'f', 0)); } @@ -458,7 +459,7 @@ void UDPSinkGUI::on_udpPort_textEdited(const QString& arg1 __attribute__((unused void UDPSinkGUI::on_volume_valueChanged(int value) { - ui->volumeText->setText(tr("%1").arg(value/10.0, 0, 'f', 1)); + ui->gainText->setText(tr("%1").arg(value/10.0, 0, 'f', 1)); applySettings(); } @@ -515,18 +516,12 @@ void UDPSinkGUI::tick() m_channelPowerAvg.feed(m_udpSink->getMagSq()); m_inPowerAvg.feed(m_udpSink->getInMagSq()); - if (m_powDisplayCount < 3) - { - m_powDisplayCount++; - } - else + if (m_tickCount % 4 == 0) { double powDb = CalcDb::dbPower(m_channelPowerAvg.average()); ui->channelPower->setText(tr("%1 dB").arg(powDb, 0, 'f', 1)); double inPowDb = CalcDb::dbPower(m_inPowerAvg.average()); ui->inputPower->setText(tr("%1").arg(inPowDb, 0, 'f', 1)); - - m_powDisplayCount = 0; } int32_t bufferGauge = m_udpSink->getBufferGauge(); @@ -540,5 +535,7 @@ void UDPSinkGUI::tick() } else { ui->channelMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }"); } + + m_tickCount++; } diff --git a/plugins/channeltx/udpsink/udpsinkgui.h b/plugins/channeltx/udpsink/udpsinkgui.h index 0f102e254..7715307ce 100644 --- a/plugins/channeltx/udpsink/udpsinkgui.h +++ b/plugins/channeltx/udpsink/udpsinkgui.h @@ -82,7 +82,7 @@ private: UDPSink* m_udpSink; MovingAverage m_channelPowerAvg; MovingAverage m_inPowerAvg; - int m_powDisplayCount; + uint32_t m_tickCount; ChannelMarker m_channelMarker; // settings diff --git a/plugins/channeltx/udpsink/udpsinkgui.ui b/plugins/channeltx/udpsink/udpsinkgui.ui index 197b12f3f..1e49aa9ab 100644 --- a/plugins/channeltx/udpsink/udpsinkgui.ui +++ b/plugins/channeltx/udpsink/udpsinkgui.ui @@ -641,25 +641,16 @@ - + - + Gain - - - - 22 - 22 - - - - Linear gain - + 100 @@ -669,10 +660,13 @@ 10 + + Qt::Horizontal + - + 32 @@ -690,19 +684,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - -