diff --git a/Readme.md b/Readme.md index 3d54e7e05..f6ac5e88b 100644 --- a/Readme.md +++ b/Readme.md @@ -143,7 +143,7 @@ This is the `demoddsd` plugin. At present it can be used to decode the following It is based on the [DSDcc](https://github.com/f4exb/dsdcc) C++ library which is a rewrite of the original [DSD](https://github.com/szechyjs/dsd) program. So you will need to have DSDcc installed in your system. Please follow instructions in [DSDcc readme](https://github.com/f4exb/dsdcc/blob/master/Readme.md) to build and install DSDcc. If you install it in a custom location say `/opt/install/dsdcc` you will need to add these defines to the cmake command: `-DLIBDSDCC_INCLUDE_DIR=/opt/install/dsdcc/include/dsdcc -DLIBDSDCC_LIBRARIES=/opt/install/dsdcc/lib/libdsdcc.so` -If you have one or more serial devices interfacing the AMBE3000 chip in packet mode you can use them to decode AMBE voice frames. For that purpose you will need to compile with [SerialDV](https://github.com/f4exb/serialDV) support. Please refer to this project Readme.md to compile and install SerialDV. If you install it in a custom location say `/opt/install/serialdv` you will need to add these defines to the cmake command: `-DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so` +If you have one or more serial devices interfacing the AMBE3000 chip in packet mode you can use them to decode AMBE voice frames. For that purpose you will need to compile with [SerialDV](https://github.com/f4exb/serialDV) support. Please refer to this project Readme.md to compile and install SerialDV. If you install it in a custom location say `/opt/install/serialdv` you will need to add these defines to the cmake command: `-DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so` Also your user must be a member of group `dialout` to be able to use the dongle. Although such serial devices work with a serial interface at 400 kb in practice maybe for other reasons they are capable of handling only one conversation at a time. The software will allocate the device dynamically to a conversation with an inactivity timeout of 1 second so that conversations do not get interrupted constantly making the audio output too choppy. In practice you will have to have as many devices connected to your system as the number of conversations you would like to be handled in parallel. @@ -219,7 +219,7 @@ Install cmake version 3:

With newer versions just do:

- - `sudo apt-get install cmake g++ pkg-config libfftw3-dev libqt5multimedia5-plugins qtmultimedia5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtbase5-dev libusb-1.0 librtlsdr-dev libboost-all-dev libasound2-dev pulseaudio liblz4-dev` + - `sudo apt-get install cmake g++ pkg-config libfftw3-dev libqt5multimedia5-plugins qtmultimedia5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtbase5-dev libusb-1.0 librtlsdr-dev libboost-all-dev libasound2-dev pulseaudio liblz4-dev libnanomsg-dev` - `mkdir build && cd build && cmake ../ && make` `librtlsdr-dev` is in the `universe` repo. (utopic 14.10 amd64.) diff --git a/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp b/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp index 5e6e8e28a..ac38c5e72 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp @@ -75,9 +75,10 @@ void ChannelAnalyzerNGGUI::resetToDefaults() { blockApplySettings(true); + ui->useRationalDownsampler->setChecked(false); ui->BW->setValue(30); ui->deltaFrequency->setValue(0); - ui->spanLog2->setValue(3); + ui->spanLog2->setCurrentIndex(3); blockApplySettings(false); applySettings(); @@ -91,7 +92,7 @@ QByteArray ChannelAnalyzerNGGUI::serialize() const s.writeBlob(3, ui->spectrumGUI->serialize()); s.writeU32(4, m_channelMarker.getColor().rgb()); s.writeS32(5, ui->lowCut->value()); - s.writeS32(6, ui->spanLog2->value()); + s.writeS32(6, ui->spanLog2->currentIndex()); s.writeBool(7, ui->ssb->isChecked()); s.writeBlob(8, ui->scopeGUI->serialize()); return s.final(); @@ -138,7 +139,7 @@ bool ChannelAnalyzerNGGUI::deserialize(const QByteArray& data) blockApplySettings(false); m_channelMarker.blockSignals(false); - ui->spanLog2->setValue(spanLog2); + ui->spanLog2->setCurrentIndex(spanLog2); setNewRate(spanLog2); ui->BW->setValue(bw); ui->lowCut->setValue(lowCut); // does applySettings(); @@ -167,6 +168,7 @@ void ChannelAnalyzerNGGUI::tick() Real powDb = CalcDb::dbPower(m_channelAnalyzer->getMagSq()); m_channelPowerDbAvg.feed(powDb); ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1)); +// ui->channelPower->setText(QString::number(powDb, 'f', 1)); } void ChannelAnalyzerNGGUI::channelSampleRateChanged() @@ -251,9 +253,9 @@ void ChannelAnalyzerNGGUI::on_lowCut_valueChanged(int value) applySettings(); } -void ChannelAnalyzerNGGUI::on_spanLog2_valueChanged(int value) +void ChannelAnalyzerNGGUI::on_spanLog2_currentIndexChanged(int index) { - if (setNewRate(value)) { + if (setNewRate(index)) { applySettings(); } @@ -333,6 +335,9 @@ ChannelAnalyzerNGGUI::ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceSourceAPI ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold)); ui->deltaFrequency->setValueRange(7, 0U, 9999999U); + ui->channelSampleRate->setColorMapper(ColorMapper(ColorMapper::ReverseGreenYellow)); + ui->channelSampleRate->setValueRange(7, 0U, 9999999U); + ui->glSpectrum->setCenterFrequency(m_rate/2); ui->glSpectrum->setSampleRate(m_rate); ui->glSpectrum->setDisplayWaterfall(true); @@ -381,6 +386,9 @@ bool ChannelAnalyzerNGGUI::setNewRate(int spanLog2) { qDebug("ChannelAnalyzerNGGUI::setNewRate"); + ui->channelSampleRate->setValueRange(7, 0, m_channelAnalyzer->getSampleRate()); + ui->channelSampleRate->setValue(m_channelAnalyzer->getSampleRate()); + if ((spanLog2 < 0) || (spanLog2 > 6)) { return false; } diff --git a/plugins/channelrx/chanalyzerng/chanalyzernggui.h b/plugins/channelrx/chanalyzerng/chanalyzernggui.h index 814e13676..5d3fd17be 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzernggui.h +++ b/plugins/channelrx/chanalyzerng/chanalyzernggui.h @@ -63,7 +63,7 @@ private slots: void on_deltaMinus_toggled(bool minus); void on_BW_valueChanged(int value); void on_lowCut_valueChanged(int value); - void on_spanLog2_valueChanged(int value); + void on_spanLog2_currentIndexChanged(int index); void on_ssb_toggled(bool checked); void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDoubleClicked(); @@ -78,7 +78,7 @@ private: bool m_doApplySettings; int m_rate; int m_spanLog2; - MovingAverage m_channelPowerDbAvg; + MovingAverage m_channelPowerDbAvg; ThreadedBasebandSampleSink* m_threadedChannelizer; DownChannelizer* m_channelizer; diff --git a/plugins/channelrx/chanalyzerng/chanalyzernggui.ui b/plugins/channelrx/chanalyzerng/chanalyzernggui.ui index 7d85bbd57..feda3990b 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzernggui.ui +++ b/plugins/channelrx/chanalyzerng/chanalyzernggui.ui @@ -31,7 +31,7 @@ 0 10 631 - 131 + 81 @@ -54,7 +54,7 @@ 2 - + @@ -183,6 +183,117 @@ + + + + + + Use rational downsampler + + + + + + + :/arrow_down.png:/arrow_down.png + + + + + + + + 0 + 0 + + + + + 32 + 16 + + + + + Monospace + 12 + + + + Rational downsampler output rate + + + + + + + S/s + + + + + + + + 40 + 16777215 + + + + Channel downsampling + + + + 1 + + + + + 2 + + + + + 4 + + + + + 8 + + + + + 16 + + + + + 32 + + + + + 64 + + + + + + + + Channel final sample rate + + + 6.0k + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + @@ -222,64 +333,12 @@ - - - - - - Rate - - - - - - - Channel sample rate - - - 0 - - - 6 - - - 1 - - - 3 - - - 3 - - - Qt::Horizontal - - - true - - - true - - - - - - - 6.0k - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - Hi + LP @@ -331,7 +390,7 @@ - Low + HP @@ -391,7 +450,7 @@ 0 - 150 + 98 720 284 @@ -446,9 +505,9 @@ 0 - 450 + 390 720 - 314 + 334 @@ -481,7 +540,7 @@ 200 - 280 + 300 @@ -535,6 +594,11 @@
gui/glscopenggui.h
1 + + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
diff --git a/sdrbase/dsp/movingaverage.h b/sdrbase/dsp/movingaverage.h index 8f97bfdd1..df872b5fb 100644 --- a/sdrbase/dsp/movingaverage.h +++ b/sdrbase/dsp/movingaverage.h @@ -6,7 +6,7 @@ #include #include "dsp/dsptypes.h" -template class MovingAverage { +template class MovingAverage { public: MovingAverage() : m_history(),