Browse Source

Merge branch 'f4exb:master' into copilot/add-freqdisplay-plugin

chirpmodem-v8.0.0
srcejon 7 months ago committed by GitHub
parent
commit
8abbe204b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      plugins/channelrx/demodadsb/adsbdemod.cpp
  2. 1
      plugins/channelrx/demodadsb/adsbdemod.h
  3. 4
      plugins/channelrx/demodais/aisdemodgui.cpp
  4. 2
      plugins/channelrx/demodais/aisdemodgui.ui
  5. 2
      plugins/channelrx/demodais/aisdemodsettings.h
  6. 2
      plugins/channelrx/demodais/readme.md
  7. 1
      plugins/channelrx/demodam/amdemod.cpp
  8. 9
      plugins/channelrx/demodchirpchat/chirpchatdemod.cpp
  9. 1
      plugins/channelrx/demodchirpchat/chirpchatdemod.h
  10. 11
      plugins/channelrx/demoddatv/datvdemod.cpp
  11. 1
      plugins/channelrx/demoddatv/datvdemod.h
  12. 8
      plugins/channelrx/demoddsd/dsddemod.cpp
  13. 1
      plugins/channelrx/demoddsd/dsddemod.h
  14. 4
      plugins/channelrx/demodendoftrain/endoftraindemodgui.cpp
  15. 4
      plugins/channelrx/demodendoftrain/endoftraindemodgui.ui
  16. 4
      plugins/channelrx/demodendoftrain/readme.md
  17. 12
      plugins/channelrx/demodfreedv/freedvdemod.cpp
  18. 1
      plugins/channelrx/demodfreedv/freedvdemod.h
  19. 11
      plugins/channelrx/demodft8/ft8demod.cpp
  20. 1
      plugins/channelrx/demodft8/ft8demod.h
  21. 8
      plugins/channelrx/demodm17/m17demod.cpp
  22. 1
      plugins/channelrx/demodm17/m17demod.h
  23. 2
      plugins/channelrx/demodm17/m17demodsink.cpp
  24. 11
      plugins/channelrx/demodnfm/nfmdemod.cpp
  25. 1
      plugins/channelrx/demodnfm/nfmdemod.h
  26. 2
      plugins/channelrx/demodnfm/nfmdemodsettings.h
  27. 4
      plugins/channelrx/demodnfm/nfmdemodsink.cpp
  28. 4
      plugins/channelrx/demodpacket/packetdemodgui.cpp
  29. 4
      plugins/channelrx/demodpacket/packetdemodgui.ui
  30. 2
      plugins/channelrx/demodpacket/readme.md
  31. 4
      plugins/channelrx/demodpager/pagerdemodgui.cpp
  32. 4
      plugins/channelrx/demodpager/pagerdemodgui.ui
  33. 2
      plugins/channelrx/demodpager/readme.md
  34. 4
      plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp
  35. 2
      plugins/channelrx/demodradiosonde/radiosondedemodgui.ui
  36. 2
      plugins/channelrx/demodradiosonde/radiosondedemodsettings.h
  37. 2
      plugins/channelrx/demodradiosonde/readme.md
  38. 11
      plugins/channelrx/demodssb/ssbdemod.cpp
  39. 1
      plugins/channelrx/demodssb/ssbdemod.h
  40. 11
      plugins/channelrx/demodwfm/wfmdemod.cpp
  41. 1
      plugins/channelrx/demodwfm/wfmdemod.h
  42. 11
      plugins/channelrx/freqtracker/freqtracker.cpp
  43. 1
      plugins/channelrx/freqtracker/freqtracker.h
  44. 9
      plugins/channelrx/remotesink/remotesink.cpp
  45. 1
      plugins/channelrx/remotesink/remotesink.h
  46. 7
      plugins/channelrx/remotetcpsink/remotetcpsink.cpp
  47. 1
      plugins/channelrx/remotetcpsink/remotetcpsink.h
  48. 10
      plugins/channelrx/udpsink/udpsink.cpp
  49. 1
      plugins/channelrx/udpsink/udpsink.h
  50. 11
      plugins/channelrx/wdsprx/wdsprx.cpp
  51. 1
      plugins/channelrx/wdsprx/wdsprx.h
  52. 6
      plugins/channeltx/modais/aismodgui.cpp
  53. 4
      plugins/channeltx/modais/aismodgui.ui
  54. 2
      plugins/channeltx/modais/aismodsettings.cpp
  55. 2
      plugins/channeltx/modais/readme.md
  56. 8
      plugins/channeltx/modnfm/nfmmod.cpp
  57. 2
      plugins/channeltx/modnfm/nfmmodsettings.h
  58. 1
      plugins/channeltx/modnfm/nfmmodsource.cpp
  59. 6
      plugins/channeltx/modpacket/packetmodgui.cpp
  60. 4
      plugins/channeltx/modpacket/packetmodgui.ui
  61. 2
      plugins/channeltx/modpacket/readme.md
  62. 2
      plugins/channeltx/modwfm/readme.md
  63. 4
      plugins/channeltx/modwfm/wfmmodgui.cpp
  64. 4
      plugins/channeltx/modwfm/wfmmodgui.ui
  65. 2
      plugins/channeltx/modwfm/wfmmodsettings.h
  66. 2
      sdrbase/settings/rollupstate.cpp
  67. 2
      sdrgui/gui/rollupcontents.cpp

9
plugins/channelrx/demodadsb/adsbdemod.cpp

@ -54,6 +54,7 @@ ADSBDemod::ADSBDemod(DeviceAPI *devieAPI) : @@ -54,6 +54,7 @@ ADSBDemod::ADSBDemod(DeviceAPI *devieAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(devieAPI),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_targetAzElValid(false),
m_targetAzimuth(0.0f),
m_targetElevation(0.0f)
@ -134,16 +135,15 @@ void ADSBDemod::start() @@ -134,16 +135,15 @@ void ADSBDemod::start()
{
qDebug() << "ADSBDemod::start";
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_worker->reset();
m_worker->startWork();
m_basebandSink->reset();
m_basebandSink->startWork();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
ADSBDemodWorker::MsgConfigureADSBDemodWorker *msg = ADSBDemodWorker::MsgConfigureADSBDemodWorker::create(m_settings, QStringList(), true);
m_worker->getInputMessageQueue()->push(msg);
}
@ -174,6 +174,7 @@ bool ADSBDemod::handleMessage(const Message& cmd) @@ -174,6 +174,7 @@ bool ADSBDemod::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
qDebug() << "ADSBDemod::handleMessage: DSPSignalNotification";

1
plugins/channelrx/demodadsb/adsbdemod.h

@ -188,6 +188,7 @@ private: @@ -188,6 +188,7 @@ private:
ADSBDemodBaseband* m_basebandSink;
ADSBDemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
bool m_targetAzElValid;
float m_targetAzimuth;

4
plugins/channelrx/demodais/aisdemodgui.cpp

@ -575,7 +575,7 @@ void AISDemodGUI::on_rfBW_valueChanged(int value) @@ -575,7 +575,7 @@ void AISDemodGUI::on_rfBW_valueChanged(int value)
void AISDemodGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySettings(QStringList({"fmDeviation"}));
}
@ -894,7 +894,7 @@ void AISDemodGUI::displaySettings() @@ -894,7 +894,7 @@ void AISDemodGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
ui->thresholdText->setText(QString("%1").arg(m_settings.m_correlationThreshold));

2
plugins/channelrx/demodais/aisdemodgui.ui

@ -301,7 +301,7 @@ @@ -301,7 +301,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>

2
plugins/channelrx/demodais/aisdemodsettings.h

@ -36,7 +36,7 @@ struct AISDemodSettings @@ -36,7 +36,7 @@ struct AISDemodSettings
qint32 m_baud;
qint32 m_inputFrequencyOffset;
Real m_rfBandwidth;
Real m_fmDeviation;
Real m_fmDeviation; //!< Peak deviation to give modulation index of 0.5 for 9600 baud
Real m_correlationThreshold;
QString m_filterMMSI;
bool m_udpEnabled;

2
plugins/channelrx/demodais/readme.md

@ -40,7 +40,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim @@ -40,7 +40,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim
<h3>5: Dev - Frequency deviation</h3>
Adjusts the expected frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical values are 4.8 kHz, corresponding to a modulation index of 0.5 at 9,600 baud.
Adjusts the expected peak frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical values are 4.8 kHz, corresponding to a modulation index of 0.5 at 9,600 baud.
<h3>6: TH - Correlation Threshold</h3>

1
plugins/channelrx/demodam/amdemod.cpp

@ -57,6 +57,7 @@ AMDemod::AMDemod(DeviceAPI *deviceAPI) : @@ -57,6 +57,7 @@ AMDemod::AMDemod(DeviceAPI *deviceAPI) :
m_basebandSink(nullptr),
m_running(false),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_lastTs(0)
{
setObjectName(m_channelId);

9
plugins/channelrx/demodchirpchat/chirpchatdemod.cpp

@ -61,6 +61,7 @@ ChirpChatDemod::ChirpChatDemod(DeviceAPI* deviceAPI) : @@ -61,6 +61,7 @@ ChirpChatDemod::ChirpChatDemod(DeviceAPI* deviceAPI) :
m_running(false),
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_lastMsgSignalDb(0.0),
m_lastMsgNoiseDb(0.0),
m_lastMsgSyncWord(0),
@ -158,13 +159,12 @@ void ChirpChatDemod::start() @@ -158,13 +159,12 @@ void ChirpChatDemod::start()
QObject::connect(m_thread, &QThread::finished, m_basebandSink, &QObject::deleteLater);
QObject::connect(m_thread, &QThread::finished, m_thread, &QThread::deleteLater);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->reset();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
SpectrumSettings spectrumSettings = m_spectrumVis.getSettings();
spectrumSettings.m_ssb = true;
SpectrumVis::MsgConfigureSpectrumVis *msg = SpectrumVis::MsgConfigureSpectrumVis::create(spectrumSettings, false);
@ -360,6 +360,7 @@ bool ChirpChatDemod::handleMessage(const Message& cmd) @@ -360,6 +360,7 @@ bool ChirpChatDemod::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "ChirpChatDemod::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << m_basebandSampleRate;
// Forward to the sink

1
plugins/channelrx/demodchirpchat/chirpchatdemod.h

@ -148,6 +148,7 @@ private: @@ -148,6 +148,7 @@ private:
ChirpChatDemodSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
float m_lastMsgSignalDb;
float m_lastMsgNoiseDb;
int m_lastMsgSyncWord;

11
plugins/channelrx/demoddatv/datvdemod.cpp

@ -45,7 +45,8 @@ MESSAGE_CLASS_DEFINITION(DATVDemod::MsgConfigureDATVDemod, Message) @@ -45,7 +45,8 @@ MESSAGE_CLASS_DEFINITION(DATVDemod::MsgConfigureDATVDemod, Message)
DATVDemod::DATVDemod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
qDebug("DATVDemod::DATVDemod");
setObjectName(m_channelId);
@ -115,14 +116,13 @@ void DATVDemod::start() @@ -115,14 +116,13 @@ void DATVDemod::start()
{
qDebug("DATVDemod::start");
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->reset();
m_basebandSink->startWork();
m_thread.start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
DATVDemodBaseband::MsgConfigureDATVDemodBaseband *msg = DATVDemodBaseband::MsgConfigureDATVDemodBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
}
@ -149,6 +149,7 @@ bool DATVDemod::handleMessage(const Message& cmd) @@ -149,6 +149,7 @@ bool DATVDemod::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate(); // store for init at start
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "DATVDemod::handleMessage: DSPSignalNotification" << m_basebandSampleRate;
// Forward to the sink

1
plugins/channelrx/demoddatv/datvdemod.h

@ -169,6 +169,7 @@ private: @@ -169,6 +169,7 @@ private:
DATVDemodBaseband* m_basebandSink;
DATVDemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

8
plugins/channelrx/demoddsd/dsddemod.cpp

@ -63,6 +63,7 @@ DSDDemod::DSDDemod(DeviceAPI *deviceAPI) : @@ -63,6 +63,7 @@ DSDDemod::DSDDemod(DeviceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_running(false),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_scopeXYSink(nullptr)
{
qDebug("DSDDemod::DSDDemod");
@ -176,13 +177,13 @@ void DSDDemod::start() @@ -176,13 +177,13 @@ void DSDDemod::start()
&QThread::deleteLater
);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->setScopeXYSink(m_scopeXYSink);
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
DSDDemodBaseband::MsgConfigureDSDDemodBaseband *msg = DSDDemodBaseband::MsgConfigureDSDDemodBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -229,6 +230,7 @@ bool DSDDemod::handleMessage(const Message& cmd) @@ -229,6 +230,7 @@ bool DSDDemod::handleMessage(const Message& cmd)
qDebug() << "DSDDemod::handleMessage: DSPSignalNotification";
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
if (m_running) {
m_basebandSink->getInputMessageQueue()->push(new DSPSignalNotification(notif));

1
plugins/channelrx/demoddsd/dsddemod.h

@ -191,6 +191,7 @@ private: @@ -191,6 +191,7 @@ private:
bool m_running;
DSDDemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QHash<Feature*, DSDDemodSettings::AvailableAMBEFeature> m_availableAMBEFeatures;
BasebandSampleSink *m_scopeXYSink;
QNetworkAccessManager *m_networkManager;

4
plugins/channelrx/demodendoftrain/endoftraindemodgui.cpp

@ -305,7 +305,7 @@ void EndOfTrainDemodGUI::on_rfBW_valueChanged(int value) @@ -305,7 +305,7 @@ void EndOfTrainDemodGUI::on_rfBW_valueChanged(int value)
void EndOfTrainDemodGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySetting("fmDeviation");
}
@ -584,7 +584,7 @@ void EndOfTrainDemodGUI::displaySettings() @@ -584,7 +584,7 @@ void EndOfTrainDemodGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
updateIndexLabel();

4
plugins/channelrx/demodendoftrain/endoftraindemodgui.ui

@ -321,7 +321,7 @@ @@ -321,7 +321,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>
@ -349,7 +349,7 @@ @@ -349,7 +349,7 @@
</size>
</property>
<property name="text">
<string>5.0k</string>
<string>±3.0k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

4
plugins/channelrx/demodendoftrain/readme.md

@ -7,7 +7,7 @@ that can be found on some trains. @@ -7,7 +7,7 @@ that can be found on some trains.
It transmits information about whether motion is detected, brake pressure, whether the marker light is on and battery information.
* Frequency: 457.9375 MHz (North America, India), 477.7 MHz (Australia) and 450.2625 MHz (New Zealand).
* Modulation: FSK, 1800Hz space, 1200 mark, +-3kHz deviation.
* Modulation: FSK, 1800Hz space, 1200 mark, ±3kHz deviation.
* Baud rate: 1200 baud.
The End-of-train packet specification is defined in:
@ -40,7 +40,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim @@ -40,7 +40,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim
<h3>5: Frequency deviation</h3>
Adjusts the expected frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical value is 3 kHz.
Adjusts the expected peak frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical value is ±3 kHz.
<h3>6: Filter Address</h3>

12
plugins/channelrx/demodfreedv/freedvdemod.cpp

@ -48,7 +48,9 @@ const char* const FreeDVDemod::m_channelId = "FreeDVDemod"; @@ -48,7 +48,9 @@ const char* const FreeDVDemod::m_channelId = "FreeDVDemod";
FreeDVDemod::FreeDVDemod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI),
m_spectrumVis(SDR_RX_SCALEF)
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
@ -120,13 +122,12 @@ void FreeDVDemod::start() @@ -120,13 +122,12 @@ void FreeDVDemod::start()
{
qDebug() << "FreeDVDemod::start";
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->reset();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
SpectrumSettings spectrumSettings = m_spectrumVis.getSettings();
spectrumSettings.m_ssb = true;
SpectrumVis::MsgConfigureSpectrumVis *msg = SpectrumVis::MsgConfigureSpectrumVis::create(spectrumSettings, false);
@ -163,6 +164,7 @@ bool FreeDVDemod::handleMessage(const Message& cmd) @@ -163,6 +164,7 @@ bool FreeDVDemod::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
qDebug() << "FreeDVDemod::handleMessage: DSPSignalNotification";

1
plugins/channelrx/demodfreedv/freedvdemod.h

@ -168,6 +168,7 @@ private: @@ -168,6 +168,7 @@ private:
FreeDVDemodSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

11
plugins/channelrx/demodft8/ft8demod.cpp

@ -58,7 +58,8 @@ FT8Demod::FT8Demod(DeviceAPI *deviceAPI) : @@ -58,7 +58,8 @@ FT8Demod::FT8Demod(DeviceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_running(false),
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
@ -181,12 +182,11 @@ void FT8Demod::start() @@ -181,12 +182,11 @@ void FT8Demod::start()
&QThread::deleteLater
);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
FT8DemodBaseband::MsgConfigureFT8DemodBaseband *msg = FT8DemodBaseband::MsgConfigureFT8DemodBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -223,6 +223,7 @@ bool FT8Demod::handleMessage(const Message& cmd) @@ -223,6 +223,7 @@ bool FT8Demod::handleMessage(const Message& cmd)
qDebug() << "FT8Demod::handleMessage: DSPSignalNotification";
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
if (m_running) {
m_basebandSink->getInputMessageQueue()->push(new DSPSignalNotification(notif));

1
plugins/channelrx/demodft8/ft8demod.h

@ -162,6 +162,7 @@ private: @@ -162,6 +162,7 @@ private:
FT8DemodSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

8
plugins/channelrx/demodm17/m17demod.cpp

@ -59,6 +59,7 @@ M17Demod::M17Demod(DeviceAPI *deviceAPI) : @@ -59,6 +59,7 @@ M17Demod::M17Demod(DeviceAPI *deviceAPI) :
m_basebandSink(nullptr),
m_running(false),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_scopeXYSink(nullptr)
{
qDebug("M17Demod::M17Demod");
@ -140,14 +141,14 @@ void M17Demod::start() @@ -140,14 +141,14 @@ void M17Demod::start()
QObject::connect(m_thread, &QThread::finished, m_basebandSink, &QObject::deleteLater);
QObject::connect(m_thread, &QThread::finished, m_thread, &QThread::deleteLater);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->setScopeXYSink(m_scopeXYSink);
m_basebandSink->reset();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
M17DemodBaseband::MsgConfigureM17DemodBaseband *msg = M17DemodBaseband::MsgConfigureM17DemodBaseband::create(m_settings, QStringList(), true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -182,6 +183,7 @@ bool M17Demod::handleMessage(const Message& cmd) @@ -182,6 +183,7 @@ bool M17Demod::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "M17Demod::handleMessage: DSPSignalNotification";
// Forward to the sink

1
plugins/channelrx/demodm17/m17demod.h

@ -286,6 +286,7 @@ private: @@ -286,6 +286,7 @@ private:
bool m_running;
M17DemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
BasebandSampleSink *m_scopeXYSink;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

2
plugins/channelrx/demodm17/m17demodsink.cpp

@ -308,7 +308,7 @@ void M17DemodSink::applySettings(const M17DemodSettings& settings, const QList<Q @@ -308,7 +308,7 @@ void M17DemodSink::applySettings(const M17DemodSettings& settings, const QList<Q
}
if (settingsKeys.contains("fmDeviation") || force) {
m_phaseDiscri.setFMScaling(48000.0f / (2.0f*M_PI*settings.m_fmDeviation));
m_phaseDiscri.setFMScaling(48000.0f / (2.0f*settings.m_fmDeviation));
}
if (settingsKeys.contains("squelchGate") || force)

11
plugins/channelrx/demodnfm/nfmdemod.cpp

@ -56,7 +56,8 @@ NFMDemod::NFMDemod(DeviceAPI *devieAPI) : @@ -56,7 +56,8 @@ NFMDemod::NFMDemod(DeviceAPI *devieAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(devieAPI),
m_running(false),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
qDebug("NFMDemod::NFMDemod");
setObjectName(m_channelId);
@ -149,12 +150,11 @@ void NFMDemod::start() @@ -149,12 +150,11 @@ void NFMDemod::start()
&QThread::deleteLater
);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
NFMDemodBaseband::MsgConfigureNFMDemodBaseband *msg = NFMDemodBaseband::MsgConfigureNFMDemodBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -189,6 +189,7 @@ bool NFMDemod::handleMessage(const Message& cmd) @@ -189,6 +189,7 @@ bool NFMDemod::handleMessage(const Message& cmd)
qDebug() << "NFMDemod::handleMessage: DSPSignalNotification";
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink if any
if (m_running) {
m_basebandSink->getInputMessageQueue()->push(new DSPSignalNotification(notif));

1
plugins/channelrx/demodnfm/nfmdemod.h

@ -152,6 +152,7 @@ private: @@ -152,6 +152,7 @@ private:
bool m_running;
NFMDemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

2
plugins/channelrx/demodnfm/nfmdemodsettings.h

@ -38,7 +38,7 @@ struct NFMDemodSettings @@ -38,7 +38,7 @@ struct NFMDemodSettings
int32_t m_inputFrequencyOffset;
Real m_rfBandwidth;
Real m_afBandwidth;
Real m_fmDeviation;
Real m_fmDeviation; //!< Full deviation in Hz (UI shows peak deviation)
int m_squelchGate;
bool m_deltaSquelch;
Real m_squelch; //!< deci-Bels

4
plugins/channelrx/demodnfm/nfmdemodsink.cpp

@ -317,7 +317,7 @@ void NFMDemodSink::applySettings(const QStringList& settingsKeys, const NFMDemod @@ -317,7 +317,7 @@ void NFMDemodSink::applySettings(const QStringList& settingsKeys, const NFMDemod
Real lowCut = -Real(settings.m_fmDeviation) / m_channelSampleRate;
Real hiCut = Real(settings.m_fmDeviation) / m_channelSampleRate;
m_rfFilter.create_filter(lowCut, hiCut);
m_phaseDiscri.setFMScaling(Real(m_audioSampleRate) / (2.0f * settings.m_fmDeviation));
m_phaseDiscri.setFMScaling(Real(m_audioSampleRate) / settings.m_fmDeviation);
}
if ((settingsKeys.contains("afBandwidth") && (settings.m_afBandwidth != m_settings.m_afBandwidth)) || force)
@ -386,7 +386,7 @@ void NFMDemodSink::applyAudioSampleRate(unsigned int sampleRate) @@ -386,7 +386,7 @@ void NFMDemodSink::applyAudioSampleRate(unsigned int sampleRate)
}
m_afSquelch.setThreshold(m_squelchLevel);
m_phaseDiscri.setFMScaling(Real(sampleRate) / (2.0f * m_settings.m_fmDeviation));
m_phaseDiscri.setFMScaling(Real(sampleRate) / m_settings.m_fmDeviation); // m_fmDeviation is full rather than peak deviation, so the usual factor of 2 is cancelled
m_audioFifo.setSize(sampleRate);
m_squelchDelayLine.resize(sampleRate/2);
m_interpolatorDistance = Real(m_channelSampleRate) / Real(sampleRate);

4
plugins/channelrx/demodpacket/packetdemodgui.cpp

@ -276,7 +276,7 @@ void PacketDemodGUI::on_rfBW_valueChanged(int value) @@ -276,7 +276,7 @@ void PacketDemodGUI::on_rfBW_valueChanged(int value)
void PacketDemodGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySettings(QStringList({"fmDeviation"}));
}
@ -538,7 +538,7 @@ void PacketDemodGUI::displaySettings() @@ -538,7 +538,7 @@ void PacketDemodGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
updateIndexLabel();

4
plugins/channelrx/demodpacket/packetdemodgui.ui

@ -339,7 +339,7 @@ @@ -339,7 +339,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>
@ -367,7 +367,7 @@ @@ -367,7 +367,7 @@
</size>
</property>
<property name="text">
<string>5.0k</string>
<string>±5.0k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

2
plugins/channelrx/demodpacket/readme.md

@ -34,7 +34,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim @@ -34,7 +34,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim
<h3>6: Frequency deviation</h3>
Adjusts the expected frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical values are 2.5 kHz and 5 kHz.
Adjusts the expected peak frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical values are ±2.5 kHz and ±5 kHz.
<h3>7: Filter Packets From</h3>

4
plugins/channelrx/demodpager/pagerdemodgui.cpp

@ -368,7 +368,7 @@ void PagerDemodGUI::on_rfBW_valueChanged(int value) @@ -368,7 +368,7 @@ void PagerDemodGUI::on_rfBW_valueChanged(int value)
void PagerDemodGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySettings(QStringList("fmDeviation"));
}
@ -665,7 +665,7 @@ void PagerDemodGUI::displaySettings() @@ -665,7 +665,7 @@ void PagerDemodGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
updateIndexLabel();

4
plugins/channelrx/demodpager/pagerdemodgui.ui

@ -301,7 +301,7 @@ @@ -301,7 +301,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>
@ -329,7 +329,7 @@ @@ -329,7 +329,7 @@
</size>
</property>
<property name="text">
<string>2.4k</string>
<string>±2.4k</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>

2
plugins/channelrx/demodpager/readme.md

@ -30,7 +30,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim @@ -30,7 +30,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim
<h3>5: Dev - Frequency deviation</h3>
Adjusts the expected frequency deviation in 0.1 kHz steps from 1 to 6 kHz. POCSAG uses FSK with a +/- 4.5 kHz shift.
Adjusts the expected peak frequency deviation in 0.1 kHz steps from 1 to 6 kHz. POCSAG uses FSK with a ±4.5 kHz shift.
<h3>6: Mod - Modulation</h3>

4
plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp

@ -398,7 +398,7 @@ void RadiosondeDemodGUI::on_rfBW_valueChanged(int value) @@ -398,7 +398,7 @@ void RadiosondeDemodGUI::on_rfBW_valueChanged(int value)
void RadiosondeDemodGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySettings(QStringList("fmDeviation"));
}
@ -748,7 +748,7 @@ void RadiosondeDemodGUI::displaySettings() @@ -748,7 +748,7 @@ void RadiosondeDemodGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
ui->thresholdText->setText(QString("%1").arg(m_settings.m_correlationThreshold));

2
plugins/channelrx/demodradiosonde/radiosondedemodgui.ui

@ -298,7 +298,7 @@ @@ -298,7 +298,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>

2
plugins/channelrx/demodradiosonde/radiosondedemodsettings.h

@ -36,7 +36,7 @@ struct RadiosondeDemodSettings @@ -36,7 +36,7 @@ struct RadiosondeDemodSettings
qint32 m_baud;
qint32 m_inputFrequencyOffset;
Real m_rfBandwidth;
Real m_fmDeviation;
Real m_fmDeviation; // Peak frequency deviation in Hz
Real m_correlationThreshold;
QString m_filterSerial;
bool m_udpEnabled;

2
plugins/channelrx/demodradiosonde/readme.md

@ -34,7 +34,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim @@ -34,7 +34,7 @@ This specifies the bandwidth of a LPF that is applied to the input signal to lim
<h3>5: Dev - Frequency deviation</h3>
Adjusts the expected frequency deviation in 0.1 kHz steps from 1 to 5 kHz. Typical value to RS41 is 2.4kHz.
Adjusts the expected peak frequency deviation in 0.1 kHz steps from 1 to 5 kHz. Typical value to RS41 is ±2.4kHz.
<h3>6: TH - Correlation Threshold</h3>

11
plugins/channelrx/demodssb/ssbdemod.cpp

@ -58,7 +58,8 @@ SSBDemod::SSBDemod(DeviceAPI *deviceAPI) : @@ -58,7 +58,8 @@ SSBDemod::SSBDemod(DeviceAPI *deviceAPI) :
m_basebandSink(nullptr),
m_running(false),
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
@ -166,12 +167,11 @@ void SSBDemod::start() @@ -166,12 +167,11 @@ void SSBDemod::start()
&QThread::deleteLater
);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
SSBDemodBaseband::MsgConfigureSSBDemodBaseband *msg = SSBDemodBaseband::MsgConfigureSSBDemodBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -208,6 +208,7 @@ bool SSBDemod::handleMessage(const Message& cmd) @@ -208,6 +208,7 @@ bool SSBDemod::handleMessage(const Message& cmd)
qDebug() << "SSBDemod::handleMessage: DSPSignalNotification";
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
if (m_running) {
m_basebandSink->getInputMessageQueue()->push(new DSPSignalNotification(notif));

1
plugins/channelrx/demodssb/ssbdemod.h

@ -160,6 +160,7 @@ private: @@ -160,6 +160,7 @@ private:
SSBDemodSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

11
plugins/channelrx/demodwfm/wfmdemod.cpp

@ -58,7 +58,8 @@ WFMDemod::WFMDemod(DeviceAPI* deviceAPI) : @@ -58,7 +58,8 @@ WFMDemod::WFMDemod(DeviceAPI* deviceAPI) :
m_thread(nullptr),
m_basebandSink(nullptr),
m_running(false),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
applySettings(QStringList(), m_settings, true);
@ -138,13 +139,12 @@ void WFMDemod::start() @@ -138,13 +139,12 @@ void WFMDemod::start()
QObject::connect(m_thread, &QThread::finished, m_basebandSink, &QObject::deleteLater);
QObject::connect(m_thread, &QThread::finished, m_thread, &QThread::deleteLater);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->reset();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
WFMDemodBaseband::MsgConfigureWFMDemodBaseband *msg = WFMDemodBaseband::MsgConfigureWFMDemodBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -178,6 +178,7 @@ bool WFMDemod::handleMessage(const Message& cmd) @@ -178,6 +178,7 @@ bool WFMDemod::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "WFMDemod::handleMessage: DSPSignalNotification";
// Forward to the sink

1
plugins/channelrx/demodwfm/wfmdemod.h

@ -153,6 +153,7 @@ private: @@ -153,6 +153,7 @@ private:
bool m_running;
WFMDemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

11
plugins/channelrx/freqtracker/freqtracker.cpp

@ -56,7 +56,8 @@ FreqTracker::FreqTracker(DeviceAPI *deviceAPI) : @@ -56,7 +56,8 @@ FreqTracker::FreqTracker(DeviceAPI *deviceAPI) :
m_basebandSink(nullptr),
m_running(false),
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
applySettings(QStringList(), m_settings, true);
@ -137,13 +138,12 @@ void FreqTracker::start() @@ -137,13 +138,12 @@ void FreqTracker::start()
QObject::connect(m_thread, &QThread::finished, m_basebandSink, &QObject::deleteLater);
QObject::connect(m_thread, &QThread::finished, m_thread, &QThread::deleteLater);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->reset();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
FreqTrackerBaseband::MsgConfigureFreqTrackerBaseband *msg = FreqTrackerBaseband::MsgConfigureFreqTrackerBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -168,6 +168,7 @@ bool FreqTracker::handleMessage(const Message& cmd) @@ -168,6 +168,7 @@ bool FreqTracker::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "FreqTracker::handleMessage: DSPSignalNotification";
// Forward to the sink

1
plugins/channelrx/freqtracker/freqtracker.h

@ -157,6 +157,7 @@ private: @@ -157,6 +157,7 @@ private:
FreqTrackerSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
static const int m_udpBlockSize;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

9
plugins/channelrx/remotesink/remotesink.cpp

@ -56,7 +56,8 @@ RemoteSink::RemoteSink(DeviceAPI *deviceAPI) : @@ -56,7 +56,8 @@ RemoteSink::RemoteSink(DeviceAPI *deviceAPI) :
m_basebandSink(nullptr),
m_running(false),
m_frequencyOffset(0),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
updateWithDeviceData();
@ -141,9 +142,8 @@ void RemoteSink::start() @@ -141,9 +142,8 @@ void RemoteSink::start()
m_basebandSink->startWork();
m_thread->start();
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
RemoteSinkBaseband::MsgConfigureRemoteSinkBaseband *msg = RemoteSinkBaseband::MsgConfigureRemoteSinkBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -178,6 +178,7 @@ bool RemoteSink::handleMessage(const Message& cmd) @@ -178,6 +178,7 @@ bool RemoteSink::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "RemoteSink::handleMessage: DSPSignalNotification: m_basebandSampleRate:" << m_basebandSampleRate;
calculateFrequencyOffset();
updateWithDeviceData(); // Device center frequency and/or sample rate has changed

1
plugins/channelrx/remotesink/remotesink.h

@ -137,6 +137,7 @@ private: @@ -137,6 +137,7 @@ private:
int64_t m_frequencyOffset;
int m_basebandSampleRate;
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

7
plugins/channelrx/remotetcpsink/remotetcpsink.cpp

@ -54,6 +54,7 @@ RemoteTCPSink::RemoteTCPSink(DeviceAPI *deviceAPI) : @@ -54,6 +54,7 @@ RemoteTCPSink::RemoteTCPSink(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_clients(0),
m_removeRequest(nullptr)
{
@ -145,9 +146,8 @@ void RemoteTCPSink::start() @@ -145,9 +146,8 @@ void RemoteTCPSink::start()
m_basebandSink->startWork();
m_thread.start();
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
MsgConfigureRemoteTCPSink* msg = MsgConfigureRemoteTCPSink::create(m_settings, QStringList(), true, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -180,6 +180,7 @@ bool RemoteTCPSink::handleMessage(const Message& cmd) @@ -180,6 +180,7 @@ bool RemoteTCPSink::handleMessage(const Message& cmd)
{
const DSPSignalNotification& notif = (const DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
qDebug() << "RemoteTCPSink::handleMessage: DSPSignalNotification: m_basebandSampleRate:" << m_basebandSampleRate;
// Forward to the sink

1
plugins/channelrx/remotetcpsink/remotetcpsink.h

@ -288,6 +288,7 @@ private: @@ -288,6 +288,7 @@ private:
RemoteTCPSinkSettings m_settings;
int m_basebandSampleRate;
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

10
plugins/channelrx/udpsink/udpsink.cpp

@ -49,6 +49,8 @@ UDPSink::UDPSink(DeviceAPI *deviceAPI) : @@ -49,6 +49,8 @@ UDPSink::UDPSink(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI),
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0),
m_centerFrequency(0),
m_channelSampleRate(48000),
m_channelFrequencyOffset(0)
{
@ -122,12 +124,11 @@ void UDPSink::start() @@ -122,12 +124,11 @@ void UDPSink::start()
{
qDebug() << "UDPSink::start";
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->reset();
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
}
void UDPSink::stop()
@ -152,6 +153,7 @@ bool UDPSink::handleMessage(const Message& cmd) @@ -152,6 +153,7 @@ bool UDPSink::handleMessage(const Message& cmd)
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
qDebug() << "UDPSink::handleMessage: DSPSignalNotification";

1
plugins/channelrx/udpsink/udpsink.h

@ -150,6 +150,7 @@ protected: @@ -150,6 +150,7 @@ protected:
UDPSinkSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
int m_channelSampleRate;
int m_channelFrequencyOffset;

11
plugins/channelrx/wdsprx/wdsprx.cpp

@ -58,7 +58,8 @@ WDSPRx::WDSPRx(DeviceAPI *deviceAPI) : @@ -58,7 +58,8 @@ WDSPRx::WDSPRx(DeviceAPI *deviceAPI) :
m_basebandSink(nullptr),
m_running(false),
m_spectrumVis(SDR_RX_SCALEF),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_centerFrequency(0)
{
setObjectName(m_channelId);
@ -168,12 +169,11 @@ void WDSPRx::start() @@ -168,12 +169,11 @@ void WDSPRx::start()
&QThread::deleteLater
);
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_thread->start();
DSPSignalNotification *dspMsg = new DSPSignalNotification(m_basebandSampleRate, m_centerFrequency);
m_basebandSink->getInputMessageQueue()->push(dspMsg);
WDSPRxBaseband::MsgConfigureWDSPRxBaseband *msg = WDSPRxBaseband::MsgConfigureWDSPRxBaseband::create(QStringList(), m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
@ -210,6 +210,7 @@ bool WDSPRx::handleMessage(const Message& cmd) @@ -210,6 +210,7 @@ bool WDSPRx::handleMessage(const Message& cmd)
qDebug() << "WDSPRx::handleMessage: DSPSignalNotification";
auto& notif = (const DSPSignalNotification&) cmd;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
// Forward to the sink
if (m_running) {
m_basebandSink->getInputMessageQueue()->push(new DSPSignalNotification(notif));

1
plugins/channelrx/wdsprx/wdsprx.h

@ -160,6 +160,7 @@ private: @@ -160,6 +160,7 @@ private:
WDSPRxSettings m_settings;
SpectrumVis m_spectrumVis;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
qint64 m_centerFrequency;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

6
plugins/channeltx/modais/aismodgui.cpp

@ -156,7 +156,7 @@ void AISModGUI::on_mode_currentIndexChanged(int value) @@ -156,7 +156,7 @@ void AISModGUI::on_mode_currentIndexChanged(int value)
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
ui->btText->setText(QString("%1").arg(m_settings.m_bt, 0, 'f', 1));
ui->bt->setValue(m_settings.m_bt * 10);
@ -174,7 +174,7 @@ void AISModGUI::on_rfBW_valueChanged(int value) @@ -174,7 +174,7 @@ void AISModGUI::on_rfBW_valueChanged(int value)
void AISModGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySettings(QStringList("fmDeviation"));
}
@ -556,7 +556,7 @@ void AISModGUI::displaySettings() @@ -556,7 +556,7 @@ void AISModGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
ui->btText->setText(QString("%1").arg(m_settings.m_bt, 0, 'f', 1));

4
plugins/channeltx/modais/aismodgui.ui

@ -304,7 +304,7 @@ @@ -304,7 +304,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>
@ -332,7 +332,7 @@ @@ -332,7 +332,7 @@
</size>
</property>
<property name="text">
<string>4.8k</string>
<string>±4.8k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

2
plugins/channeltx/modais/aismodsettings.cpp

@ -35,7 +35,7 @@ void AISModSettings::resetToDefaults() @@ -35,7 +35,7 @@ void AISModSettings::resetToDefaults()
m_inputFrequencyOffset = 0;
m_baud = 9600; // nominal value
m_rfBandwidth = 25000.0f; // 12.5k for narrow, 25k for wide (narrow is obsolete)
m_fmDeviation = 4800.0f; // To give modulation index of 0.5 for 9600 baud
m_fmDeviation = 4800.0f; // Peak deviation - To give modulation index of 0.5 for 9600 baud
m_gain = -1.0f; // To avoid overflow, which results in out-of-band RF
m_channelMute = false;
m_repeat = false;

2
plugins/channeltx/modais/readme.md

@ -34,7 +34,7 @@ This specifies the bandwidth of a LPF that is applied to the output signal to li @@ -34,7 +34,7 @@ This specifies the bandwidth of a LPF that is applied to the output signal to li
<h3>6: FM Deviation</h3>
This specifies the maximum frequency deviation. Typically this should be 4.8kHz, giving a modulation index of 0.5 at 9,600 baud.
This specifies the peak frequency deviation. Typically this should be ±4.8kHz, giving a modulation index of 0.5 at 9,600 baud.
<h3>7: BT Bandwidth</h3>

8
plugins/channeltx/modnfm/nfmmod.cpp

@ -281,10 +281,10 @@ bool NFMMod::handleMessage(const Message& cmd) @@ -281,10 +281,10 @@ bool NFMMod::handleMessage(const Message& cmd)
auto* rep = new DSPSignalNotification(notif); // make a copy
qDebug() << "NFMMod::handleMessage: DSPSignalNotification";
m_basebandSource->getInputMessageQueue()->push(rep);
// Forward to GUI if any
if (getMessageQueueToGUI()) {
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
}
}
// Forward to GUI if any
if (getMessageQueueToGUI()) {
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
}
return true;

2
plugins/channeltx/modnfm/nfmmodsettings.h

@ -48,7 +48,7 @@ struct NFMModSettings @@ -48,7 +48,7 @@ struct NFMModSettings
qint64 m_inputFrequencyOffset;
Real m_rfBandwidth;
Real m_afBandwidth;
float m_fmDeviation;
float m_fmDeviation; //!< Full deviation in Hz (UI shows peak deviation)
float m_toneFrequency;
float m_volumeFactor;
bool m_channelMute;

1
plugins/channeltx/modnfm/nfmmodsource.cpp

@ -171,6 +171,7 @@ void NFMModSource::modulateSample() @@ -171,6 +171,7 @@ void NFMModSource::modulateSample()
t1 = m_lowpass.filter(t);
}
// The usual factor of 2*pi is cancelled by m_fmDeviation being the full rather than peak deviation
m_modPhasor += (float) ((M_PI * m_settings.m_fmDeviation / (float) m_audioSampleRate) * t1);
// limit phasor range to ]-pi,pi]

6
plugins/channeltx/modpacket/packetmodgui.cpp

@ -151,7 +151,7 @@ void PacketModGUI::on_mode_currentIndexChanged(int value) @@ -151,7 +151,7 @@ void PacketModGUI::on_mode_currentIndexChanged(int value)
m_settings.setMode(mode);
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
ui->glSpectrum->setCenterFrequency(m_settings.m_spectrumRate/4);
ui->glSpectrum->setSampleRate(m_settings.m_spectrumRate/2);
@ -173,7 +173,7 @@ void PacketModGUI::on_rfBW_valueChanged(int value) @@ -173,7 +173,7 @@ void PacketModGUI::on_rfBW_valueChanged(int value)
void PacketModGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmDeviation = value * 100.0;
applySettings(QStringList("fmDeviation"));
}
@ -593,7 +593,7 @@ void PacketModGUI::displaySettings() @@ -593,7 +593,7 @@ void PacketModGUI::displaySettings()
ui->rfBWText->setText(QString("%1k").arg(m_settings.m_rfBandwidth / 1000.0, 0, 'f', 1));
ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0, 0, 'f', 1));
ui->fmDev->setValue(m_settings.m_fmDeviation / 100.0);
ui->gainText->setText(QString("%1").arg((double)m_settings.m_gain, 0, 'f', 1));

4
plugins/channeltx/modpacket/packetmodgui.ui

@ -304,7 +304,7 @@ @@ -304,7 +304,7 @@
</size>
</property>
<property name="toolTip">
<string>Frequency deviation</string>
<string>Peak frequency deviation</string>
</property>
<property name="minimum">
<number>10</number>
@ -332,7 +332,7 @@ @@ -332,7 +332,7 @@
</size>
</property>
<property name="text">
<string>5.0k</string>
<string>±5.0k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

2
plugins/channeltx/modpacket/readme.md

@ -32,7 +32,7 @@ This specifies the bandwidth of a LPF that is applied to the output signal to li @@ -32,7 +32,7 @@ This specifies the bandwidth of a LPF that is applied to the output signal to li
<h3>6: Frequency deviation</h3>
Adjusts the frequency deviation in 0.1 kHz steps from 1 to 6 kHz. Typical values are 2.5 kHz and 5 kHz.
Adjusts the frequency peak deviation in 0.1 kHz steps from 1 to 6 kHz. Typical values are ±2.5 kHz and ±5 kHz.
<h3>7: Gain</h3>

2
plugins/channeltx/modwfm/readme.md

@ -32,7 +32,7 @@ This is the bandwidth in kHz of the modulating signal filtered before modulation @@ -32,7 +32,7 @@ This is the bandwidth in kHz of the modulating signal filtered before modulation
<h3>7: Frequency deviation</h3>
Adjusts the frequency deviation in 1 kHz steps from 0 to 100 kHz
Adjusts the peak frequency deviation in 1 kHz steps from 0 to 100 kHz
<h3>8: Volume</h3>

4
plugins/channeltx/modwfm/wfmmodgui.cpp

@ -172,7 +172,7 @@ void WFMModGUI::on_afBW_valueChanged(int value) @@ -172,7 +172,7 @@ void WFMModGUI::on_afBW_valueChanged(int value)
void WFMModGUI::on_fmDev_valueChanged(int value)
{
ui->fmDevText->setText(QString("%1k").arg(value));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value));
m_settings.m_fmDeviation = value * 1000.0;
applySettings(QStringList("fmDeviation"));
}
@ -476,7 +476,7 @@ void WFMModGUI::displaySettings() @@ -476,7 +476,7 @@ void WFMModGUI::displaySettings()
ui->afBWText->setText(QString("%1k").arg(m_settings.m_afBandwidth / 1000.0));
ui->afBW->setValue(m_settings.m_afBandwidth / 1000.0);
ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0));
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(m_settings.m_fmDeviation / 1000.0));
ui->fmDev->setValue(m_settings.m_fmDeviation / 1000.0);
ui->volumeText->setText(QString("%1").arg(m_settings.m_volumeFactor, 0, 'f', 1));

4
plugins/channeltx/modwfm/wfmmodgui.ui

@ -302,7 +302,7 @@ @@ -302,7 +302,7 @@
</size>
</property>
<property name="toolTip">
<string>Modulation percentage</string>
<string>Peak frequency deviation</string>
</property>
<property name="maximum">
<number>100</number>
@ -327,7 +327,7 @@ @@ -327,7 +327,7 @@
</size>
</property>
<property name="text">
<string>50k</string>
<string>±50k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

2
plugins/channeltx/modwfm/wfmmodsettings.h

@ -45,7 +45,7 @@ struct WFMModSettings @@ -45,7 +45,7 @@ struct WFMModSettings
qint64 m_inputFrequencyOffset;
Real m_rfBandwidth;
Real m_afBandwidth;
float m_fmDeviation;
float m_fmDeviation; //!< Peak frequency deviation in Hz
float m_toneFrequency;
float m_volumeFactor;
bool m_channelMute;

2
sdrbase/settings/rollupstate.cpp

@ -33,7 +33,7 @@ QByteArray RollupState::serialize() const @@ -33,7 +33,7 @@ QByteArray RollupState::serialize() const
QDataStream stream(&state, QIODevice::WriteOnly);
stream << VersionMarker;
stream << m_version;
stream << m_childrenStates.size();
stream << (int) m_childrenStates.size();
for (const auto &child : m_childrenStates)
{

2
sdrgui/gui/rollupcontents.cpp

@ -129,7 +129,7 @@ int RollupContents::arrangeRollups() @@ -129,7 +129,7 @@ int RollupContents::arrangeRollups()
}
int h = 0;
if (r->hasHeightForWidth()) {
h = r->heightForWidth(width() - 4);
h = r->heightForWidth(width() - 4); // FIXME: This is preferred height for the given width, not the minimum height.
} else {
h = r->minimumSizeHint().height();
}

Loading…
Cancel
Save