Browse Source

Merge branch 'f4exb:master' into fixes

chirpmodem-v8.1.0
srcejon 4 weeks ago committed by GitHub
parent
commit
de0bddf420
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      devices/limesdr/devicelimesdr.cpp
  2. 4
      devices/perseus/deviceperseus.h
  3. 4
      ft8/libldpc.cpp
  4. 13
      httpserver/httpresponse.cpp
  5. 4
      modemdab/dabensemble.cpp
  6. 2
      modemdab/dabfft.cpp
  7. 4
      modemdab/dabmsc.cpp
  8. 4
      modemdab/dabofdm.cpp
  9. 12
      modemdr/journaline.cpp
  10. 5
      modemdvb/dvbs2receiver.cpp
  11. 18
      modemdvb/dvbt2fec.cpp
  12. 5
      modemdvb/dvbt2ofdm.cpp
  13. 14
      modemdvb/dvbt2receiver.cpp
  14. 13
      modemdvb/dvbtinner.cpp
  15. 1
      modemdvb/dvbtmodulator.cpp
  16. 9
      modemdvb/dvbtofdm.cpp
  17. 1
      modemdvb/dvbtouter.cpp
  18. 22
      plugins/channelrx/demod802.15.4/ieee_802_15_4_demodreceiver.cpp
  19. 4
      plugins/channelrx/demodapt/aptdemod.cpp
  20. 1
      plugins/channelrx/demodapt/aptdemod.h
  21. 1
      plugins/channelrx/demodapt/aptdemodsettings.cpp
  22. 2
      plugins/channelrx/demodapt/aptdemodsink.h
  23. 2
      plugins/channelrx/demoddatv/leansdr/dvbs2.h
  24. 6
      plugins/channelrx/demoddvb/dvbdemodepg.cpp
  25. 2
      plugins/channelrx/demoddvb/dvbdemodgui.cpp
  26. 2
      plugins/channelrx/demodinmarsat/inmarsatdemodsink.cpp
  27. 4
      plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp
  28. 2
      plugins/channelrx/demodwefax/wefaxdemodgui.cpp
  29. 6
      plugins/channelrx/remotesink/remotesinkfifo.cpp
  30. 6
      plugins/channelrx/sigmffilesink/sigmffilesinkbaseband.cpp
  31. 5
      plugins/channelrx/sigmffilesink/sigmffilesinksink.cpp
  32. 2
      plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp
  33. 2
      plugins/feature/afc/afc.cpp
  34. 10
      plugins/feature/denoiser/denoiserworker.cpp
  35. 7
      plugins/feature/mcpserver/mcptools.cpp
  36. 4
      plugins/feature/morsedecoder/morsedecoder.h
  37. 1
      plugins/feature/morsedecoder/morsedecodersettings.cpp
  38. 2
      plugins/feature/satellitetracker/satellitetrackersgp4.cpp
  39. 6
      plugins/feature/startracker/startrackerworker.cpp
  40. 3
      plugins/samplemimo/limesdrmimo/limesdrmithread.cpp
  41. 4
      plugins/samplemimo/limesdrmimo/limesdrmothread.cpp
  42. 6
      plugins/samplesink/remoteoutput/remoteoutputfifo.cpp
  43. 1
      plugins/samplesink/remoteoutput/udpsinkfec.cpp
  44. 12
      plugins/samplesource/remoteinput/remoteinputbuffer.h
  45. 9
      plugins/samplesource/sigmffileinput/sigmffiledata.h
  46. 29
      plugins/samplesource/sigmffileinput/sigmffileinputworker.cpp
  47. 10
      sdrbase/dtv/dtvcarousel.cpp
  48. 14
      sdrbase/dtv/dtvpsi.cpp
  49. 2
      sdrbase/dtv/dtvrecorder.cpp
  50. 1
      sdrbase/dtv/dtvudp.cpp
  51. 5
      sdrbase/util/osndb.h
  52. 2
      sdrbench/test_ft8protocols.cpp
  53. 8
      sdrgui/dtv/dtvvideoplayer.h
  54. 4
      sdrgui/gui/glshadercolormap.cpp
  55. 4
      sdrgui/gui/glshaderspectrogram.cpp
  56. 2
      sdrgui/gui/scidoublespinbox.cpp
  57. 2
      sdrgui/gui/spectrummeasurements.cpp

6
devices/limesdr/devicelimesdr.cpp

@ -167,7 +167,7 @@ bool DeviceLimeSDR::SetRFELNA_dB(lms_device_t *device, std::size_t chan, int val @@ -167,7 +167,7 @@ bool DeviceLimeSDR::SetRFELNA_dB(lms_device_t *device, std::size_t chan, int val
{
if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0)
{
fprintf(stderr, "DeviceLimeSDR::SetRFELNA_dB: cannot set channel to #%lu\n", chan);
fprintf(stderr, "DeviceLimeSDR::SetRFELNA_dB: cannot set channel to #%zu\n", chan);
return false;
}
@ -207,7 +207,7 @@ bool DeviceLimeSDR::SetRFETIA_dB(lms_device_t *device, std::size_t chan, int val @@ -207,7 +207,7 @@ bool DeviceLimeSDR::SetRFETIA_dB(lms_device_t *device, std::size_t chan, int val
{
if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0)
{
fprintf(stderr, "DeviceLimeSDR::SetRFETIA_dB: cannot set channel to #%lu\n", chan);
fprintf(stderr, "DeviceLimeSDR::SetRFETIA_dB: cannot set channel to #%zu\n", chan);
return false;
}
@ -232,7 +232,7 @@ bool DeviceLimeSDR::SetRBBPGA_dB(lms_device_t *device, std::size_t chan, float v @@ -232,7 +232,7 @@ bool DeviceLimeSDR::SetRBBPGA_dB(lms_device_t *device, std::size_t chan, float v
{
if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0)
{
fprintf(stderr, "DeviceLimeSDR::SetRBBPGA_dB: cannot set channel to #%lu\n", chan);
fprintf(stderr, "DeviceLimeSDR::SetRBBPGA_dB: cannot set channel to #%zu\n", chan);
return false;
}

4
devices/perseus/deviceperseus.h

@ -34,8 +34,8 @@ public: @@ -34,8 +34,8 @@ public:
protected:
DevicePerseus();
DevicePerseus(const DevicePerseus&) : m_nbDevices(0) {}
DevicePerseus& operator=(const DevicePerseus& other) { (void) other; return *this; }
DevicePerseus(const DevicePerseus&) = delete;
DevicePerseus& operator=(const DevicePerseus&) = delete;
~DevicePerseus();
private:

4
ft8/libldpc.cpp

@ -409,7 +409,7 @@ void LDPC::gauss_jordan(int rows, int cols, int m[174][2 * 91], int which[91], i @@ -409,7 +409,7 @@ void LDPC::gauss_jordan(int rows, int cols, int m[174][2 * 91], int which[91], i
{
if (m[row][row] != 1)
{
for (int row1 = row + 1; row1 < cols; row1++)
for (int row1 = row + 1; row1 < rows; row1++)
{
if (m[row1][row] == 1)
{
@ -436,7 +436,7 @@ void LDPC::gauss_jordan(int rows, int cols, int m[174][2 * 91], int which[91], i @@ -436,7 +436,7 @@ void LDPC::gauss_jordan(int rows, int cols, int m[174][2 * 91], int which[91], i
// lazy creation of identity matrix in the upper-right quarter
m[row][rows + row] = (m[row][rows + row] + 1) % 2;
// now eliminate
for (int row1 = 0; row1 < cols; row1++)
for (int row1 = 0; row1 < rows; row1++)
{
if (row1 == row)
continue;

13
httpserver/httpresponse.cpp

@ -130,14 +130,11 @@ void HttpResponse::write(QByteArray data, bool lastPart) @@ -130,14 +130,11 @@ void HttpResponse::write(QByteArray data, bool lastPart)
{
if (chunkedMode)
{
if (data.size()>0)
{
QByteArray size=QByteArray::number(data.size(),16);
writeToSocket(size);
writeToSocket("\r\n");
writeToSocket(data);
writeToSocket("\r\n");
}
QByteArray size=QByteArray::number(data.size(),16);
writeToSocket(size);
writeToSocket("\r\n");
writeToSocket(data);
writeToSocket("\r\n");
}
else
{

4
modemdab/dabensemble.cpp

@ -968,6 +968,10 @@ void DABEnsemble::fig2(const uint8_t *data, int length) @@ -968,6 +968,10 @@ void DABEnsemble::fig2(const uint8_t *data, int length)
field.insert(field.end(), label.segments[i].begin(), label.segments[i].end());
}
if (field.size() < 3) {
return;
}
const bool ucs2 = (field[0] & 0x80) != 0;
const uint16_t flags = static_cast<uint16_t>((field[1] << 8) | field[2]);
const int charset = ucs2 ? 6 : 15;

2
modemdab/dabfft.cpp

@ -85,7 +85,7 @@ void DABFFT::transform(const std::complex<float> *in, std::complex<float> *out) @@ -85,7 +85,7 @@ void DABFFT::transform(const std::complex<float> *in, std::complex<float> *out)
// Through the plan's aligned buffers, so any input and output can be used
std::memcpy(m_implementation->in, in, sizeof(fftwf_complex) * m_size);
fftwf_execute(m_implementation->plan);
std::memcpy(out, m_implementation->out, sizeof(fftwf_complex) * m_size);
std::memcpy(static_cast<void*>(out), m_implementation->out, sizeof(fftwf_complex) * m_size);
}
const char *DABFFT::backend()

4
modemdab/dabmsc.cpp

@ -30,8 +30,8 @@ DABSubchannelDecoder::DABSubchannelDecoder() : @@ -30,8 +30,8 @@ DABSubchannelDecoder::DABSubchannelDecoder() :
m_filled(0),
m_lastDamaged(false),
m_bitErrors(0),
m_countErrors(true),
m_comparedBits(0)
m_comparedBits(0),
m_countErrors(true)
{
reset();
}

4
modemdab/dabofdm.cpp

@ -101,9 +101,9 @@ DABFrontEnd::DABFrontEnd() : @@ -101,9 +101,9 @@ DABFrontEnd::DABFrontEnd() :
m_exportCarriers(false),
m_filterFFT(FilterFFTSize, false),
m_filterIFFT(FilterFFTSize, true),
m_haveCarrierPower(false),
m_haveCarrierNoise(false),
m_noiseFrames(0),
m_haveCarrierPower(false)
m_noiseFrames(0)
{
// Kaiser windowed sinc (beta 7.86 for about 80 dB of stop band attenuation)
std::vector<std::complex<float>> taps(FilterFFTSize, 0.0f);

12
modemdr/journaline.cpp

@ -178,9 +178,15 @@ bool JournalineDecoder::push(const std::vector<std::uint8_t>& dataUnit) @@ -178,9 +178,15 @@ bool JournalineDecoder::push(const std::vector<std::uint8_t>& dataUnit)
if (crcPresent)
{
if (end < 4U)
{
++m_invalidDataUnits;
return false;
}
const std::uint16_t crc = static_cast<std::uint16_t>((dataUnit[end - 2U] << 8) | dataUnit[end - 1U]);
if (end < 4U || CRC::crc16(dataUnit.data(), end - 2U) != crc)
if (CRC::crc16(dataUnit.data(), end - 2U) != crc)
{
++m_invalidDataUnits;
return false;
@ -231,6 +237,10 @@ bool JournalineDecoder::push(const std::vector<std::uint8_t>& dataUnit) @@ -231,6 +237,10 @@ bool JournalineDecoder::push(const std::vector<std::uint8_t>& dataUnit)
}
}
if (oldest == m_received.end()) {
break;
}
m_objects.erase(oldest->first);
m_received.erase(oldest);
}

5
modemdvb/dvbs2receiver.cpp

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
#include <chrono>
#include <cmath>
#include <cstring>
#include <QDebug>
#include "util/profiler.h"
#include "dvbs2receiver.h"
@ -892,6 +893,10 @@ void Receiver::deframe(FrameSlot& slot) @@ -892,6 +893,10 @@ void Receiver::deframe(FrameSlot& slot)
{
const XFECFrame& frame = slot.m_frame;
const int kbch = frame.m_vlsnr >= 0 ? vlsnrKbch(frame.m_vlsnr) : dvbt2::kbch(frame.m_fecType, frame.m_rate, CodeFamily::S2);
if (kbch <= 0) {
qWarning() << "Receiver::deframe: Invalid BCH information length" << kbch;
return;
}
const bool bad = slot.m_corrected < 0;
dvbt2::scrambleBytes(slot.m_packed.data(), kbch / 8);
dvbt2::BBFrameDecoder::Header header;

18
modemdvb/dvbt2fec.cpp

@ -26,6 +26,8 @@ @@ -26,6 +26,8 @@
#include <stdexcept>
#include <string>
#include <QDebug>
#include "dvbt2fec.h"
#include "dvbt2ldpc.h"
@ -728,6 +730,19 @@ const int *CellMapper::demuxTable(CodeRate rate, Constellation constellation, FE @@ -728,6 +730,19 @@ const int *CellMapper::demuxTable(CodeRate rate, Constellation constellation, FE
void cellBitMap(FECType type, CodeRate rate, Constellation constellation, std::vector<int>& map)
{
switch (constellation)
{
case Constellation::QPSK:
case Constellation::QAM16:
case Constellation::QAM64:
case Constellation::QAM256:
break;
default:
qWarning() << "cellBitMap: Invalid constellation" << static_cast<int>(constellation);
map.clear();
return;
}
const int n = nldpc(type);
const int k = kldpc(type, rate);
const int qldpc = (n - k) / 360;
@ -1030,7 +1045,8 @@ int L1Codec::postTableIndex(L1Constellation constellation) @@ -1030,7 +1045,8 @@ int L1Codec::postTableIndex(L1Constellation constellation)
L1Codec::L1Codec() :
m_preLDPC(FECType::Short, CodeRate::R1_4),
m_postLDPC(FECType::Short, CodeRate::R1_2),
m_bch(FECType::Short, 12)
m_bch(FECType::Short, 12),
m_postBlock()
{
layout(m_preKsig, m_preKbch, m_preKldpc, 16200 - m_preKldpc, m_preNpunc, m_preGroups, m_preParity, m_preBlock);
}

5
modemdvb/dvbt2ofdm.cpp

@ -108,7 +108,10 @@ OFDMDemod::OFDMDemod(int bandwidthHz, FFTFactory *fftFactory) : @@ -108,7 +108,10 @@ OFDMDemod::OFDMDemod(int bandwidthHz, FFTFactory *fftFactory) :
m_sampleRate(sampleRate(bandwidthHz)),
m_p2Tables(nullptr),
m_tables(nullptr),
m_interpolationSpacing(0)
m_interpolationSpacing(0),
m_gridSpacing(0),
m_gridOffset(0),
m_gridAmplitude(0.0f)
{
m_fft.m_factory = fftFactory;
m_p1Fft.m_factory = fftFactory;

14
modemdvb/dvbt2receiver.cpp

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
#include <chrono>
#include <cmath>
#include <cstring>
#include <QDebug>
#include "util/profiler.h"
@ -1182,6 +1183,19 @@ void Receiver::analyseBlock(FEC& fec, int block, const uint8_t *packed) @@ -1182,6 +1183,19 @@ void Receiver::analyseBlock(FEC& fec, int block, const uint8_t *packed)
return;
}
switch (fec.m_constellation)
{
case Constellation::QPSK:
case Constellation::QAM16:
case Constellation::QAM64:
case Constellation::QAM256:
break;
default:
qWarning() << "Receiver::analyseBlock: Invalid constellation"
<< static_cast<int>(fec.m_constellation);
return;
}
LDPC& ldpc = *fec.m_ldpc;
const int k = ldpc.k();
const int eta = bitsPerCell(fec.m_constellation);

13
modemdvb/dvbtinner.cpp

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
#include <algorithm>
#include <cmath>
#include <QDebug>
#include "dvbtinner.h"
@ -88,6 +89,18 @@ float InnerDecoder::normalisation(Constellation constellation, Hierarchy hierarc @@ -88,6 +89,18 @@ float InnerDecoder::normalisation(Constellation constellation, Hierarchy hierarc
void InnerDecoder::configure(Mode mode, Constellation constellation, CodeRate codeRate, Hierarchy hierarchy, bool lowPriority)
{
switch (constellation)
{
case Constellation::QPSK:
case Constellation::QAM16:
case Constellation::QAM64:
break;
default:
qWarning() << "InnerDecoder::configure: Invalid constellation"
<< static_cast<int>(constellation);
return;
}
const Tables& tables = Tables::get(mode);
m_mode = mode;

1
modemdvb/dvbtmodulator.cpp

@ -39,6 +39,7 @@ Modulator::Modulator(Mode mode, Constellation constellation, CodeRate codeRate, @@ -39,6 +39,7 @@ Modulator::Modulator(Mode mode, Constellation constellation, CodeRate codeRate,
m_tables(Tables::get(mode)),
m_hierarchy(constellation == Constellation::QPSK ? Hierarchy::None : hierarchy),
m_lpCodeRate(lpCodeRate),
m_tpsBits{},
m_symbolIndex(0),
m_frameNumber(0)
{

9
modemdvb/dvbtofdm.cpp

@ -232,7 +232,14 @@ OFDMDemod::OFDMDemod(int bandwidthHz, FFTFactory *fftFactory) : @@ -232,7 +232,14 @@ OFDMDemod::OFDMDemod(int bandwidthHz, FFTFactory *fftFactory) :
m_guardSize(0),
m_symbolSize(0),
m_kMax(0),
m_backoff(0)
m_backoff(0),
m_ring{},
m_smoothingCutoff(0.0),
m_noiseConstellation(Constellation::QPSK),
m_lastSPPhase(0),
m_spPhaseRun(0),
m_tpsSync(0),
m_tpsBits{}
{
m_fft.m_factory = fftFactory;
m_cirFft.m_factory = fftFactory;

1
modemdvb/dvbtouter.cpp

@ -118,6 +118,7 @@ std::vector<uint8_t> OuterDecoder::makePRBS() @@ -118,6 +118,7 @@ std::vector<uint8_t> OuterDecoder::makePRBS()
}
OuterDecoder::OuterDecoder() :
m_packet{},
m_prbs(makePRBS())
{
for (int j = 0; j < m_interleaverI; j++) {

22
plugins/channelrx/demod802.15.4/ieee_802_15_4_demodreceiver.cpp

@ -37,6 +37,28 @@ IEEE_802_15_4_DemodReceiver::IEEE_802_15_4_DemodReceiver() : @@ -37,6 +37,28 @@ IEEE_802_15_4_DemodReceiver::IEEE_802_15_4_DemodReceiver() :
m_nonCoherentLane(true),
m_mask(0),
m_n(0),
m_waitMax(0.0f),
m_waitMaxN(0),
m_omega(0.0),
m_ncoRef(0),
m_dNext(0),
m_yNext(0),
m_tau(0.0),
m_phi(0.0),
m_dphi(0.0),
m_phaseInit(false),
m_frameStart(0),
m_powerSum(0.0),
m_powerCount(0),
m_qSum(0.0),
m_qCount(0),
m_ampSum(0.0),
m_ampSumSq(0.0),
m_ampCount(0),
m_acquisitionN(0),
m_detectorCleared(false),
m_framers{},
m_prevECoh(0),
m_crcScopeCount(0)
{
m_stats = Statistics{0, 0, 0, 0, 0, 0};

4
plugins/channelrx/demodapt/aptdemod.cpp

@ -734,9 +734,9 @@ int APTDemod::webapiActionsPost( @@ -734,9 +734,9 @@ int APTDemod::webapiActionsPost(
{
SWGSDRangel::SWGAPTDemodActions_aos* aos = swgAPTDemodActions->getAos();
QString *satelliteName = aos->getSatelliteName();
qDebug() << "APTDemod::webapiActionsPost - AOS " << *satelliteName;
if (satelliteName != nullptr)
{
qDebug() << "APTDemod::webapiActionsPost - AOS " << *satelliteName;
if (matchSatellite(*satelliteName))
{
// Reset for new pass
@ -775,10 +775,10 @@ int APTDemod::webapiActionsPost( @@ -775,10 +775,10 @@ int APTDemod::webapiActionsPost(
{
SWGSDRangel::SWGAPTDemodActions_los* los = swgAPTDemodActions->getLos();
QString *satelliteName = los->getSatelliteName();
qDebug() << "APTDemod::webapiActionsPost - LOS " << *satelliteName;
if (satelliteName != nullptr)
{
qDebug() << "APTDemod::webapiActionsPost - LOS " << *satelliteName;
if (matchSatellite(*satelliteName))
{
// Save image

1
plugins/channelrx/demodapt/aptdemod.h

@ -144,6 +144,7 @@ public: @@ -144,6 +144,7 @@ public:
MsgLine() :
Message(),
m_line{},
m_size(APT_PROW_WIDTH)
{}
};

1
plugins/channelrx/demodapt/aptdemodsettings.cpp

@ -50,6 +50,7 @@ void APTDemodSettings::resetToDefaults() @@ -50,6 +50,7 @@ void APTDemodSettings::resetToDefaults()
m_saveCombined = true;
m_saveSeparate = false;
m_saveProjection = false;
m_northToSouth = false;
m_scanlinesPerImageUpdate = 20;
m_transparencyThreshold = 100;
m_opacityThreshold = 200;

2
plugins/channelrx/demodapt/aptdemodsink.h

@ -45,6 +45,8 @@ class APTDemod; @@ -45,6 +45,8 @@ class APTDemod;
class APTDemodSink : public ChannelSampleSink {
public:
APTDemodSink();
APTDemodSink(const APTDemodSink&) = delete;
APTDemodSink& operator=(const APTDemodSink&) = delete;
~APTDemodSink();
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end);

2
plugins/channelrx/demoddatv/leansdr/dvbs2.h

@ -3712,6 +3712,8 @@ struct s2_fecdec_helper : runnable @@ -3712,6 +3712,8 @@ struct s2_fecdec_helper : runnable
~s2_fecdec_helper()
{
killall(); // also deletes pools[mc][sf].procs if necessary
delete bitcount;
delete errcount;
}
void run()

6
plugins/channelrx/demoddvb/dvbdemodepg.cpp

@ -114,6 +114,12 @@ int DVBDemodEPG::eitVersionKey(int sourceTable, int section) @@ -114,6 +114,12 @@ int DVBDemodEPG::eitVersionKey(int sourceTable, int section)
}
DVBDemodEPG::DVBDemodEPG() :
m_nitSections{},
m_sdtSections{},
m_eitSections{},
m_timeSections{},
m_freesatSiSections{},
m_freesatEitSections{},
m_freesatRegion(0),
m_networkId(-1),
m_transportStreamId(-1),

2
plugins/channelrx/demoddvb/dvbdemodgui.cpp

@ -2801,7 +2801,7 @@ QString DVBDemodGUI::shortCodecName(const QString& name) @@ -2801,7 +2801,7 @@ QString DVBDemodGUI::shortCodecName(const QString& name)
// The codecs and picture size in the table, the A/V problems, and the mute button green while audio is playing
void DVBDemodGUI::displayPlayerInfo(uint64_t tsOverflows)
{
DTVVideoPlayer::Info info;
DTVVideoPlayer::Info info{};
if (m_player) {
info = m_player->getInfo();

2
plugins/channelrx/demodinmarsat/inmarsatdemodsink.cpp

@ -315,6 +315,7 @@ Complex LMSEqualizer::processOneSample(Complex x, bool update, bool training) @@ -315,6 +315,7 @@ Complex LMSEqualizer::processOneSample(Complex x, bool update, bool training)
InmarsatDemodSink::InmarsatDemodSink(InmarsatDemod *stdCDemod) :
m_scopeSink(nullptr),
m_inmarsatDemod(stdCDemod),
m_channel(nullptr),
m_channelSampleRate(InmarsatDemodSettings::CHANNEL_SAMPLE_RATE),
m_channelFrequencyOffset(0),
m_magsqSum(0.0f),
@ -329,6 +330,7 @@ InmarsatDemodSink::InmarsatDemodSink(InmarsatDemod *stdCDemod) : @@ -329,6 +330,7 @@ InmarsatDemodSink::InmarsatDemodSink(InmarsatDemod *stdCDemod) :
m_costasLoop(10*2*M_PI/100.0, 2),
m_locked(false),
m_rrcBufferIndex(0),
m_bits{},
m_sampleBufferIndexA(0),
m_sampleBufferIndexB(0)
{

4
plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp

@ -82,14 +82,14 @@ MeshtasticDemod::MeshtasticDemod(DeviceAPI* deviceAPI) : @@ -82,14 +82,14 @@ MeshtasticDemod::MeshtasticDemod(DeviceAPI* deviceAPI) :
m_lastMsgHeaderParityStatus(0),
m_lastMsgPayloadCRC(false),
m_lastMsgPayloadParityStatus(0),
m_udpSink(this, 256)
m_udpSink(this, 256),
m_networkManager(new QNetworkAccessManager())
{
setObjectName(m_channelId);
applySettings(m_settings, true);
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
QObject::connect(
this,

2
plugins/channelrx/demodwefax/wefaxdemodgui.cpp

@ -695,7 +695,7 @@ bool WefaxDemodGUI::eventFilter(QObject *watched, QEvent *event) @@ -695,7 +695,7 @@ bool WefaxDemodGUI::eventFilter(QObject *watched, QEvent *event)
}
if (delta != 0)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
const QPoint anchor = wheelEvent->position().toPoint();
#else
const QPoint anchor = wheelEvent->pos();

6
plugins/channelrx/remotesink/remotesinkfifo.cpp

@ -18,7 +18,11 @@ @@ -18,7 +18,11 @@
#include "remotesinkfifo.h"
RemoteSinkFifo::RemoteSinkFifo(QObject *parent) :
QObject(parent)
QObject(parent),
m_size(0),
m_readHead(0),
m_servedHead(0),
m_writeHead(0)
{}
RemoteSinkFifo::RemoteSinkFifo(unsigned int size, QObject *parent) :

6
plugins/channelrx/sigmffilesink/sigmffilesinkbaseband.cpp

@ -31,9 +31,13 @@ MESSAGE_CLASS_DEFINITION(SigMFFileSinkBaseband::MsgConfigureSigMFFileSinkWork, M @@ -31,9 +31,13 @@ MESSAGE_CLASS_DEFINITION(SigMFFileSinkBaseband::MsgConfigureSigMFFileSinkWork, M
SigMFFileSinkBaseband::SigMFFileSinkBaseband() :
m_channelizer(&m_sink),
m_spectrumSink(nullptr),
m_messageQueueToGUI(nullptr),
m_specMax(0),
m_squelchLevel(0),
m_squelchOpen(false)
m_squelchOpen(false),
m_centerFrequency(0),
m_timer(nullptr)
{
qDebug("SigMFFileSinkBaseband::SigMFFileSinkBaseband");
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000));

5
plugins/channelrx/sigmffilesink/sigmffilesinksink.cpp

@ -29,6 +29,10 @@ @@ -29,6 +29,10 @@
#include "sigmffilesinksink.h"
SigMFFileSinkSink::SigMFFileSinkSink() :
m_channelSampleRate(0),
m_channelFrequencyOffset(0),
m_sinkSampleRate(0),
m_centerFrequency(0),
m_preRecordBuffer(48000),
m_preRecordFill(0),
m_spectrumSink(nullptr),
@ -37,6 +41,7 @@ SigMFFileSinkSink::SigMFFileSinkSink() : @@ -37,6 +41,7 @@ SigMFFileSinkSink::SigMFFileSinkSink() :
m_record(false),
m_squelchOpen(false),
m_postSquelchCounter(0),
m_deviceUId(0),
m_msCount(0),
m_byteCount(0)
{}

2
plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp

@ -519,7 +519,7 @@ int IEEE_802_15_4_ModSource::getChip() @@ -519,7 +519,7 @@ int IEEE_802_15_4_ModSource::getChip()
m_symbol = getSymbol();
if (m_settings.m_bitRate <= 40000) {
chip = IEEE_802_15_4_PHY::m_chipsBPSK[m_symbol][m_chipIdx];
chip = IEEE_802_15_4_PHY::m_chipsBPSK[m_symbol & 1][m_chipIdx];
} else if (m_settings.m_subGHzBand) {
chip = IEEE_802_15_4_PHY::m_chipsSubGHzOQPSK[m_symbol][m_chipIdx];
} else {

2
plugins/feature/afc/afc.cpp

@ -317,6 +317,8 @@ void AFC::updateDeviceSetLists() @@ -317,6 +317,8 @@ void AFC::updateDeviceSetLists()
if (getMessageQueueToGUI()) {
getMessageQueueToGUI()->push(msg);
} else {
delete msg;
}
}

10
plugins/feature/denoiser/denoiserworker.cpp

@ -46,7 +46,11 @@ DenoiserWorker::DenoiserWorker(QObject *parent) : @@ -46,7 +46,11 @@ DenoiserWorker::DenoiserWorker(QObject *parent) :
m_recordSilenceNbSamples(0),
m_recordSilenceCount(0),
m_nbBytes(0),
m_rnnoiseIn{},
m_rnnoiseOut{},
m_rnnoiseFill(0),
m_nvidiaIn{},
m_nvidiaOut{},
m_nvidiaFill(0),
m_nvidiaInitAttempted(false),
m_nvidiaReady(false),
@ -54,8 +58,12 @@ DenoiserWorker::DenoiserWorker(QObject *parent) : @@ -54,8 +58,12 @@ DenoiserWorker::DenoiserWorker(QObject *parent) :
m_nvidiaStatusReported(false),
m_nvidiaGeneration(0),
m_vst3Effect(nullptr),
m_vst3Input{},
m_vst3Output{},
m_vst3Fill(0),
m_vst3FailureReported(false)
m_vst3FailureReported(false),
m_rmsLevel(0.0),
m_peakLevelOut(0.0)
{
m_audioBuffer.resize(4800);
m_audioBufferFill = 0;

7
plugins/feature/mcpserver/mcptools.cpp

@ -6193,6 +6193,11 @@ void MCPTools::registerIntentTools() @@ -6193,6 +6193,11 @@ void MCPTools::registerIntentTools()
return result;
});
QJsonObject gainValuesList = prop("array", "For a device type this does not know: the gain values to try, in the key's own units, lowest first");
QJsonObject gainValuesItems;
gainValuesItems["type"] = "number";
gainValuesList["items"] = gainValuesItems;
add("tune_gain",
"Find the receiver gain that gives the best signal to noise ratio and apply it: steps the device through its gain range "
"and at each step measures the noise floor and the strongest signal on the main spectrum. Too little gain leaves weak "
@ -6212,7 +6217,7 @@ void MCPTools::registerIntentTools() @@ -6212,7 +6217,7 @@ void MCPTools::registerIntentTools()
{"apply", prop("boolean", "Apply the chosen gain. false measures and reports but puts the gain back as it was. Default true")},
{"autoscale", prop("boolean", "Once the chosen gain is applied, set the main spectrum's reference level and range from what it then shows, as spectrum_action autoscale does, so the display suits the new gain. Default true")},
{"gainKey", strProp("For a device type this does not know: the settings key of its gain, from describe_settings. Then give values too")},
{"values", prop("array", "For a device type this does not know: the gain values to try, in the key's own units, lowest first")},
{"values", gainValuesList},
{"agcKey", strProp("For a device type this does not know: the settings key that turns its AGC off when set to 0")}
}, {"deviceSetIndex"}),
[this](const QJsonObject& args) { return tuneGain(args); });

4
plugins/feature/morsedecoder/morsedecoder.h

@ -171,6 +171,10 @@ public: @@ -171,6 +171,10 @@ public:
QString m_text;
MsgReportText(const QString& text) :
m_estimatedPitchHz(0.0f),
m_estimatedSpeedWPM(0.0f),
m_signalThreshold(0.0f),
m_costFunction(0.0f),
m_text(text)
{}
};

1
plugins/feature/morsedecoder/morsedecodersettings.cpp

@ -32,6 +32,7 @@ const QStringList MorseDecoderSettings::m_channelURIs = { @@ -32,6 +32,7 @@ const QStringList MorseDecoderSettings::m_channelURIs = {
};
MorseDecoderSettings::MorseDecoderSettings() :
m_scopeGUI(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();

2
plugins/feature/satellitetracker/satellitetrackersgp4.cpp

@ -198,7 +198,7 @@ bool getPassesThrough0Deg(const QString& tle0, const QString& tle1, const QStrin @@ -198,7 +198,7 @@ bool getPassesThrough0Deg(const QString& tle0, const QString& tle1, const QStrin
double timeStep = (losTime - aosTime).TotalSeconds() / steps;
double prevAz;
double prevAz = 0.0;
for (int i = 0; i < steps; i++)
{
// Calculate satellite position

6
plugins/feature/startracker/startrackerworker.cpp

@ -610,8 +610,8 @@ bool StarTrackerWorker::getRAFromHorizons(const QDateTime &dateTime, RADec &rdJ2 @@ -610,8 +610,8 @@ bool StarTrackerWorker::getRAFromHorizons(const QDateTime &dateTime, RADec &rdJ2
void StarTrackerWorker::update()
{
AzAlt aa, sunAA, moonAA;
RADec rdJnow, sunRD, moonRD;
AzAlt aa{}, sunAA{}, moonAA;
RADec rdJnow, sunRD{}, moonRD;
bool rdJnowValid = false;
double l, b;
bool lbTarget = false;
@ -988,7 +988,7 @@ void StarTrackerWorker::update() @@ -988,7 +988,7 @@ void StarTrackerWorker::update()
for (int step = 0; step <= 24*60*60/timestep; step++)
{
AzAlt aa;
AzAlt aa{};
RADec rdJnow, rdJ2000;
// Calculate elevation of desired object

3
plugins/samplemimo/limesdrmimo/limesdrmithread.cpp

@ -24,7 +24,10 @@ LimeSDRMIThread::LimeSDRMIThread(lms_stream_t* stream0, lms_stream_t* stream1, Q @@ -24,7 +24,10 @@ LimeSDRMIThread::LimeSDRMIThread(lms_stream_t* stream0, lms_stream_t* stream1, Q
m_running(false),
m_stream0(stream0),
m_stream1(stream1),
m_buf0{},
m_buf1{},
m_sampleFifo(nullptr),
m_log2Decim(0),
m_iqOrder(true)
{
setObjectName("LimeSDRMI");

4
plugins/samplemimo/limesdrmimo/limesdrmothread.cpp

@ -25,7 +25,9 @@ LimeSDRMOThread::LimeSDRMOThread(lms_stream_t* stream0, lms_stream_t* stream1, Q @@ -25,7 +25,9 @@ LimeSDRMOThread::LimeSDRMOThread(lms_stream_t* stream0, lms_stream_t* stream1, Q
m_running(false),
m_stream0(stream0),
m_stream1(stream1),
m_sampleFifo(nullptr)
m_buf(nullptr),
m_sampleFifo(nullptr),
m_log2Interp(0)
{
qDebug("LimeSDRMOThread::LimeSDRMOThread");
m_buf = new qint16[2*DeviceLimeSDR::blockSize*2];

6
plugins/samplesink/remoteoutput/remoteoutputfifo.cpp

@ -18,7 +18,11 @@ @@ -18,7 +18,11 @@
#include "remoteoutputfifo.h"
RemoteOutputFifo::RemoteOutputFifo(QObject *parent) :
QObject(parent)
QObject(parent),
m_size(0),
m_readHead(0),
m_servedHead(0),
m_writeHead(0)
{}
RemoteOutputFifo::RemoteOutputFifo(unsigned int size, QObject *parent) :

1
plugins/samplesink/remoteoutput/udpsinkfec.cpp

@ -37,6 +37,7 @@ UDPSinkFEC::UDPSinkFEC() : @@ -37,6 +37,7 @@ UDPSinkFEC::UDPSinkFEC() :
m_txBlockIndex(0),
m_frameCount(0),
m_sampleIndex(0),
m_deviceIndex(0),
m_remoteOutputSender(nullptr),
m_senderThread(nullptr),
m_remoteAddress("127.0.0.1"),

12
plugins/samplesource/remoteinput/remoteinputbuffer.h

@ -136,7 +136,17 @@ private: @@ -136,7 +136,17 @@ private:
int m_recoveryCount; //!< number of recovery blocks received
bool m_decoded; //!< true if decoded
bool m_metaRetrieved; //!< true if meta data (block zero) was retrieved
DecoderSlot() {}
DecoderSlot() :
m_blockZero{},
m_originalBlocks{},
m_recoveryBlocks{},
m_cm256DescriptorBlocks{},
m_blockCount(0),
m_originalCount(0),
m_recoveryCount(0),
m_decoded(false),
m_metaRetrieved(false)
{}
};
RemoteMetaDataFEC m_currentMeta; //!< Stored current meta data

9
plugins/samplesource/sigmffileinput/sigmffiledata.h

@ -93,7 +93,14 @@ public: @@ -93,7 +93,14 @@ public:
unsigned int m_nbCaptures;
unsigned int m_nbAnnotations;
SigMFFileMetaInfo()
SigMFFileMetaInfo() :
m_totalSamples(0),
m_totalTimeMs(0),
m_coreSampleRate(0.0),
m_offset(0),
m_rxBits(0),
m_nbCaptures(0),
m_nbAnnotations(0)
{}
SigMFFileMetaInfo(const SigMFFileMetaInfo& other) :

29
plugins/samplesource/sigmffileinput/sigmffileinputworker.cpp

@ -35,22 +35,25 @@ SigMFFileInputWorker::SigMFFileInputWorker(std::ifstream *samplesStream, @@ -35,22 +35,25 @@ SigMFFileInputWorker::SigMFFileInputWorker(std::ifstream *samplesStream,
const QTimer& timer,
MessageQueue *fileInputMessageQueue,
QObject* parent) :
QObject(parent),
m_running(false),
QObject(parent),
m_running(false),
m_metaInfo(nullptr),
m_captures(nullptr),
m_currentTrackIndex(0),
m_ifstream(samplesStream),
m_fileBuf(0),
m_convertBuf(0),
m_bufsize(0),
m_chunksize(0),
m_sampleFifo(sampleFifo),
m_samplesCount(0),
m_timer(timer),
m_fileInputMessageQueue(fileInputMessageQueue),
m_ifstream(samplesStream),
m_fileBuf(0),
m_convertBuf(0),
m_bufsize(0),
m_chunksize(0),
m_sampleFifo(sampleFifo),
m_samplesCount(0),
m_totalSamples(0),
m_timer(timer),
m_fileInputMessageQueue(fileInputMessageQueue),
m_samplerate(48000),
m_accelerationFactor(1),
m_samplesize(16),
m_samplebytes(2),
m_samplesize(16),
m_samplebytes(2),
m_throttlems(FILESOURCE_THROTTLE_MS),
m_throttleToggle(false),
m_sigMFConverter(nullptr)

10
sdrbase/dtv/dtvcarousel.cpp

@ -293,12 +293,20 @@ void DTVCarousel::dii(const uint8_t *m, int length, uint32_t transactionId) @@ -293,12 +293,20 @@ void DTVCarousel::dii(const uint8_t *m, int length, uint32_t transactionId)
const int userInfoLength = ri.u8();
const uint8_t *userInfo = ri.bytes(userInfoLength);
for (int d = 0; userInfo && (d + 2 <= userInfoLength); d += 2 + userInfo[d + 1])
for (int d = 0; userInfo && (d + 2 <= userInfoLength); )
{
const int descriptorLength = userInfo[d + 1];
if (descriptorLength > userInfoLength - d - 2) {
break;
}
// compressed_module_descriptor: compression_method (zlib), original_size
if ((userInfo[d] == m_compressedModuleDescriptor) && (userInfo[d + 1] >= 5) && (d + 7 <= userInfoLength)) {
originalSize = (int) std::min<uint32_t>(0x7FFFFFFF, ((uint32_t) userInfo[d + 3] << 24) | (userInfo[d + 4] << 16) | (userInfo[d + 5] << 8) | userInfo[d + 6]);
}
d += 2 + descriptorLength;
}
if ((moduleSize > m_maxModuleSize) || (originalSize > m_maxModuleSize)) {

14
sdrbase/dtv/dtvpsi.cpp

@ -17,11 +17,14 @@ @@ -17,11 +17,14 @@
///////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include <QDebug>
#include "dtv/dtvpsi.h"
#include "dtv/dtvsections.h"
DTVPSI::DTVPSI() :
m_pat(),
m_nit(),
m_transportStreamId(-1)
{
}
@ -44,9 +47,20 @@ const std::map<int, int>& DTVPSI::getChannels() const @@ -44,9 +47,20 @@ const std::map<int, int>& DTVPSI::getChannels() const
void DTVPSI::feed(const uint8_t *data, int length)
{
if (!data || length <= 0) {
return;
}
// Complete a packet split between feeds
if (!m_partial.empty())
{
if (m_partial.size() >= 188)
{
qWarning() << "DTVPSI::feed: m_partial size is unexpectedly"
<< m_partial.size();
return;
}
int needed = std::min(188 - (int) m_partial.size(), length);
m_partial.insert(m_partial.end(), data, data + needed);
data += needed;

2
sdrbase/dtv/dtvrecorder.cpp

@ -27,6 +27,8 @@ DTVRecorder::DTVRecorder() : @@ -27,6 +27,8 @@ DTVRecorder::DTVRecorder() :
m_mode(Multiplex),
m_serviceId(0),
m_started(false),
m_patSections(),
m_pmtSections(),
m_transportStreamId(-1),
m_pmtPid(-1),
m_pmtVersion(-1),

1
sdrbase/dtv/dtvudp.cpp

@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
DTVUDP::DTVUDP() :
m_port(5004),
m_datagram{},
m_datagramFill(0),
m_datagrams(0),
m_address(QHostAddress::LocalHost),

5
sdrbase/util/osndb.h

@ -56,6 +56,11 @@ struct SDRBASE_API AircraftInformation { @@ -56,6 +56,11 @@ struct SDRBASE_API AircraftInformation {
QString m_operatorICAO;
QString m_registered;
AircraftInformation() :
m_icao(0)
{
}
static void init()
{
QMutexLocker locker(&m_mutex);

2
sdrbench/test_ft8protocols.cpp

@ -275,6 +275,8 @@ void TestFT8Protocols::testOnesZeroes(const QStringList& argElements) @@ -275,6 +275,8 @@ void TestFT8Protocols::testOnesZeroes(const QStringList& argElements)
}
qInfo("TestFT8Protocols::testOnesZeroes: (%d,%d) index: zeroes, ones:\n%s", nbBits, bitIndex, qPrintable(s));
delete[] ones;
delete[] zeroes;
}
void TestFT8Protocols::testSoftDecode(const QStringList& argElements)

8
sdrgui/dtv/dtvvideoplayer.h

@ -88,13 +88,13 @@ public: @@ -88,13 +88,13 @@ public:
QString m_videoCodec; //!< FFmpeg's long name
QString m_videoDecoder; //!< The GPU's (e.g. CUDA, D3D11VA), or empty if decoded in software
QString m_audioCodec;
int m_width;
int m_height;
int m_width = 0;
int m_height = 0;
uint64_t m_videoFrames;
uint64_t m_audioFrames;
uint64_t m_audioFrames = 0;
uint64_t m_decodeErrors;
uint64_t m_lateFrames; //!< Not shown, as they were too late
bool m_audioDescription; //!< Audio description is being mixed in
bool m_audioDescription = false; //!< Audio description is being mixed in
uint64_t m_adFrames; //!< Audio description frames decoded
int m_adFade; //!< Latest fade of the main audio, from the audio description (0 to 255)
bool m_subtitles; //!< A subtitle stream is being decoded

4
sdrgui/gui/glshadercolormap.cpp

@ -126,7 +126,11 @@ void GLShaderColorMap::initColorMapTextureImmutable(const QString &colorMapName) @@ -126,7 +126,11 @@ void GLShaderColorMap::initColorMapTextureImmutable(const QString &colorMapName)
GLfloat *colorMap = (GLfloat *)ColorMap::getColorMap(colorMapName);
if (colorMap) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
m_colorMapTexture->setData(QOpenGLTexture::RGB, QOpenGLTexture::Float32, static_cast<const void *>(colorMap));
#else
m_colorMapTexture->setData(QOpenGLTexture::RGB, QOpenGLTexture::Float32, colorMap);
#endif
} else {
qDebug() << "GLShaderColorMap::initColorMapTextureImmutable: colorMap " << colorMapName << " not supported";
}

4
sdrgui/gui/glshaderspectrogram.cpp

@ -279,7 +279,11 @@ void GLShaderSpectrogram::initColorMapTextureImmutable(const QString &colorMapNa @@ -279,7 +279,11 @@ void GLShaderSpectrogram::initColorMapTextureImmutable(const QString &colorMapNa
GLfloat *colorMap = (GLfloat *)ColorMap::getColorMap(colorMapName);
if (colorMap) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
m_colorMapTexture->setData(QOpenGLTexture::RGB, QOpenGLTexture::Float32, static_cast<const void *>(colorMap));
#else
m_colorMapTexture->setData(QOpenGLTexture::RGB, QOpenGLTexture::Float32, colorMap);
#endif
} else {
qDebug() << "GLShaderSpectrogram::initColorMapTextureImmutable: colorMap " << colorMapName << " not supported";
}

2
sdrgui/gui/scidoublespinbox.cpp

@ -35,7 +35,7 @@ QValidator::State SciDoubleSpinBox::validate(QString &input, int &pos) const @@ -35,7 +35,7 @@ QValidator::State SciDoubleSpinBox::validate(QString &input, int &pos) const
(void) pos;
bool ok;
input.toDouble(&ok);
(void) input.toDouble(&ok);
if (ok) {
return QValidator::Acceptable;
}

2
sdrgui/gui/spectrummeasurements.cpp

@ -403,7 +403,7 @@ void SpectrumMeasurements::createMaskTable(unsigned memMask) @@ -403,7 +403,7 @@ void SpectrumMeasurements::createMaskTable(unsigned memMask)
int row = 0;
for (int i = 0; i < 32; i++)
{
if ((memMask & (1 << i)) != 0)
if ((memMask & (1U << i)) != 0)
{
m_maskTable->setVerticalHeaderItem(row, new QTableWidgetItem(QString("M%1").arg(i + 1)));

Loading…
Cancel
Save