1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

Fix compilation warnings and errors

This commit is contained in:
DreamNik 2024-09-03 18:38:32 +03:00 committed by f4exb
parent a684d1a32b
commit 34cf612031
103 changed files with 106 additions and 164 deletions

View File

@ -85,8 +85,9 @@ struct FT8_API cdecode
// total transmission time is 12.64 seconds
// tunable parameters
struct FT8_API FT8Params
class FT8_API FT8Params
{
public:
int nthreads; // number of parallel threads, for multi-core
int npasses_one; // number of spectral subtraction passes
int npasses_two; // number of spectral subtraction passes

View File

@ -94,7 +94,7 @@ void HttpConnectionHandlerPool::cleanup()
if (++idleCounter > maxIdleHandlers)
{
pool.removeOne(handler);
qDebug("HttpConnectionHandlerPool: Removed connection handler (%p), pool size is now %i",handler,pool.size());
qDebug("HttpConnectionHandlerPool: Removed connection handler (%p), pool size is now %i",handler,(int)pool.size());
delete handler;
break; // remove only one handler in each interval
}

View File

@ -35,7 +35,7 @@ StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
maxCachedFileSize=settings->value("maxCachedFileSize","65536").toInt();
cache.setMaxCost(settings->value("cacheSize","1000000").toInt());
cacheTimeout=settings->value("cacheTime","60000").toInt();
qDebug("StaticFileController: cache timeout=%i, size=%i",cacheTimeout,cache.maxCost());
qDebug("StaticFileController: cache timeout=%i, size=%i",cacheTimeout,(int)cache.maxCost());
}
StaticFileController::StaticFileController(const HttpDocrootSettings& settings, QObject* parent)
@ -56,7 +56,7 @@ StaticFileController::StaticFileController(const HttpDocrootSettings& settings,
maxCachedFileSize=settings.maxCachedFileSize;
cache.setMaxCost(settings.cacheSize);
cacheTimeout=settings.cacheTime;
qDebug("StaticFileController: cache timeout=%i, size=%i",cacheTimeout,cache.maxCost());
qDebug("StaticFileController: cache timeout=%i, size=%i",cacheTimeout,(int)cache.maxCost());
}
void StaticFileController::service(HttpRequest& request, HttpResponse& response)

View File

@ -239,7 +239,7 @@ constexpr T to_int(uint8_t v)
{
constexpr auto MAX_LOCAL_INPUT = (1 << (n - 1));
constexpr auto NEGATIVE_OFFSET = std::numeric_limits<typename std::make_unsigned<T>::type>::max() - (MAX_LOCAL_INPUT - 1);
T r = v & (1 << (n - 1)) ? NEGATIVE_OFFSET : 0;
T r = v & (1 << (n - 1)) ? (T)NEGATIVE_OFFSET : 0;
return r + (v & (MAX_LOCAL_INPUT - 1));
}

View File

@ -158,8 +158,6 @@ private:
BeamSteeringCWModBaseband* m_basebandSource;
QMutex m_mutex;
bool m_running;
BasebandSampleSink* m_spectrumSink;
BasebandSampleSink* m_scopeSink;
BeamSteeringCWModSettings m_settings;
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI
@ -168,7 +166,6 @@ private:
int64_t m_frequencyOffset;
uint32_t m_basebandSampleRate;
int m_count0, m_count1;
virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed
void applySettings(const BeamSteeringCWModSettings& settings, bool force = false);

View File

@ -177,7 +177,6 @@ private:
int64_t m_frequencyOffset;
uint32_t m_deviceSampleRate;
qint64 m_deviceCenterFrequency;
int m_count0, m_count1;
virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed
void applySettings(const DOA2Settings& settings, bool force = false);

View File

@ -264,7 +264,7 @@ bool DOA2Correlator::performFFTProd(
m_fft[0]->out() + m_fftSize,
m_dataj,
m_invFFT->in(),
[this](std::complex<float>& a, const std::complex<float>& b) -> std::complex<float> {
[](std::complex<float>& a, const std::complex<float>& b) -> std::complex<float> {
return (a*b);
}
);

View File

@ -44,9 +44,6 @@ private:
int m_dataSize;
int m_bufferSize;
int m_dataStart;
uint32_t m_log2Decim;
uint32_t m_filterChainHash;
};

View File

@ -196,7 +196,6 @@ private:
uint64_t m_centerFrequency;
int64_t m_frequencyOffset;
uint32_t m_deviceSampleRate;
int m_count0, m_count1;
QList<int> m_localInputDeviceIndexes;

View File

@ -555,7 +555,7 @@ bool InterferometerCorrelator::performFFTProd(
m_fft2[0]->out() + m_fftSize,
m_dataj,
m_invFFT2->in(),
[this](std::complex<float>& a, const std::complex<float>& b) -> std::complex<float> {
[](std::complex<float>& a, const std::complex<float>& b) -> std::complex<float> {
return (a*b);
}
);

View File

@ -44,9 +44,6 @@ private:
int m_dataSize;
int m_bufferSize;
int m_dataStart;
uint32_t m_log2Decim;
uint32_t m_filterChainHash;
};

View File

@ -21,12 +21,13 @@
#include "channelpowersink.h"
ChannelPowerSink::ChannelPowerSink(ChannelPower *channelPower) :
m_channelPower(channelPower),
m_channelSampleRate(10000),
m_channelFrequencyOffset(0),
m_lowpassFFT(nullptr),
m_lowpassBufferIdx(0)
{
(void)channelPower;
resetMagLevels();
applySettings(m_settings, QStringList(), true);
@ -41,7 +42,6 @@ ChannelPowerSink::~ChannelPowerSink()
void ChannelPowerSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end)
{
QMutexLocker mutexLocker(&m_mutex);
Complex ci;
for (SampleVector::const_iterator it = begin; it != end; ++it)
{

View File

@ -65,7 +65,6 @@ public:
private:
ChannelPower *m_channelPower;
ChannelPowerSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -4991,7 +4991,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_azEl.setLocation(stationLatitude, stationLongitude, stationAltitude);
// These are the default values in sdrbase/settings/preferences.cpp
if ((stationLatitude == 49.012423) && (stationLongitude == 8.418125)) {
if ((stationLatitude == (float)49.012423) && (stationLongitude == (float)8.418125)) {
ui->warning->setText("Please set your antenna location under Preferences > My Position");
}

View File

@ -811,6 +811,10 @@ public:
{
m_aircraftRegExp.optimize();
}
virtual ~ModelMatch()
{
}
virtual bool match(const QString &aircraft, const QString &manufacturer, QString &model)
{

View File

@ -79,7 +79,6 @@ void ADSBDemodSink::feed(const SampleVector::const_iterator& begin, const Sample
for (SampleVector::const_iterator it = begin; it != end; ++it)
{
Complex c(it->real(), it->imag());
Complex ci;
c *= m_nco.nextIQ();
processOneSample(complexMagSq(c));
}

View File

@ -118,8 +118,6 @@ void AISDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
void AISDemodSink::processOneSample(Complex &ci)
{
Complex ca;
// FM demodulation
double magsqRaw;
Real deviation;

View File

@ -663,7 +663,7 @@ void AMDemodGUI::snapClicked()
{
applySnap();
qint64 value;
qint64 value = 0;
if (m_settings.m_frequencyMode == AMDemodSettings::Offset) {
value = m_settings.m_inputFrequencyOffset;

View File

@ -24,7 +24,6 @@
#include "aptdemodsink.h"
APTDemodSink::APTDemodSink(APTDemod *packetDemod) :
m_aptDemod(packetDemod),
m_channelSampleRate(APTDEMOD_AUDIO_SAMPLE_RATE),
m_channelFrequencyOffset(0),
m_magsqSum(0.0f),
@ -33,6 +32,8 @@ APTDemodSink::APTDemodSink(APTDemod *packetDemod) :
m_imageWorkerMessageQueue(nullptr),
m_samples(nullptr)
{
(void)packetDemod;
m_magsq = 0.0;
applySettings(m_settings, true);
@ -129,8 +130,6 @@ void APTDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
void APTDemodSink::processOneSample(Complex &ci)
{
Complex ca;
// FM demodulation
double magsqRaw;
Real deviation;

View File

@ -87,7 +87,6 @@ private:
double m_magsqPeak;
};
APTDemod *m_aptDemod;
APTDemodSettings m_settings;
int m_channelSampleRate;
int m_channelFrequencyOffset;

View File

@ -101,9 +101,6 @@ struct ATVDemodSettings
static float getNominalLineTime(int nbLines, int fps);
static float getRFBandwidthDivisor(ATVModulation modulation);
static void getBaseValues(int sampleRate, int linesPerSecond, uint32_t& nbPointsPerLine);
private:
int m_rfSliderDivisor;
};
#endif /* PLUGINS_CHANNELRX_DEMODATV_ATVDEMODSETTINGS_H_ */

View File

@ -163,7 +163,6 @@ private:
int m_hSyncErrorCount;
float prevSample;
int m_avgColIndex;
SampleVector m_sampleBuffer;

View File

@ -467,7 +467,6 @@ void RDSParser::decode_type0(unsigned int *group, bool B)
{
unsigned int af_code_1 = 0;
unsigned int af_code_2 = 0;
unsigned int no_af = 0;
double af_1 = 0;
double af_2 = 0;
@ -534,7 +533,7 @@ void RDSParser::decode_type0(unsigned int *group, bool B)
// @TODO: Find proper header or STL on OSX
auto res = m_g0_alt_freq.insert(af_1/1e3);
m_g0_af_updated = m_g0_af_updated || res.second;
no_af += 1;
// no_af += 1;
}
if (af_2)
@ -542,7 +541,7 @@ void RDSParser::decode_type0(unsigned int *group, bool B)
// @TODO: Find proper header or STL on OSX
auto res = m_g0_alt_freq.insert(af_2/1e3);
m_g0_af_updated = m_g0_af_updated || res.second;
no_af += 2;
// no_af += 2;
}
/*

View File

@ -488,7 +488,6 @@ void DABDemodSink::processOneAudioSample(Complex &ci)
}
DABDemodSink::DABDemodSink(DABDemod *packetDemod) :
m_dabDemod(packetDemod),
m_audioSampleRate(48000),
m_dabAudioSampleRate(10000), // Unused value to begin with
m_channelSampleRate(DABDEMOD_CHANNEL_SAMPLE_RATE),
@ -500,6 +499,8 @@ DABDemodSink::DABDemodSink(DABDemod *packetDemod) :
m_messageQueueToChannel(nullptr),
m_audioFifo(48000)
{
(void)packetDemod;
m_audioBuffer.resize(1<<14);
m_audioBufferFill = 0;

View File

@ -106,7 +106,6 @@ private:
double m_magsqPeak;
};
DABDemod *m_dabDemod;
DABDemodSettings m_settings;
ChannelAPI *m_channel;

View File

@ -1096,12 +1096,12 @@ void DATVDemodSink::InitDATVS2Framework()
p_vbitcount= new leansdr::pipebuf<int>(m_objScheduler, "Bits processed", BUF_S2PACKETS);
p_verrcount = new leansdr::pipebuf<int>(m_objScheduler, "Bits corrected", BUF_S2PACKETS);
bool commandFileValid = false;
// bool commandFileValid = false;
if (QFileInfo::exists(m_settings.m_softLDPCToolPath))
{
QFileInfo fileInfo = QFileInfo(m_settings.m_softLDPCToolPath);
commandFileValid = fileInfo.isExecutable();
// commandFileValid = fileInfo.isExecutable();
}
if (m_settings.m_softLDPC /*&& commandFileValid*/)
@ -1195,11 +1195,6 @@ void DATVDemodSink::InitDATVS2Framework()
void DATVDemodSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end)
{
float fltI;
float fltQ;
fftfilt::cmplx *objRF;
int intRFOut;
int lngWritable=0;
leansdr::s2_frame_receiver<leansdr::f32, leansdr::llr_ss> *objDemodulatorDVBS2 =
(leansdr::s2_frame_receiver<leansdr::f32, leansdr::llr_ss> *) m_objDemodulatorDVBS2;

View File

@ -333,8 +333,8 @@ private:
Interpolator m_interpolator;
Real m_interpolatorDistance;
Real m_interpolatorDistanceRemain;
static const int m_interpolatorPhaseSteps = 4; // Higher than these two values will struggle to run in real-time
static const int m_interpolatorTapsPerPhase = 3.5f; // without gaining much improvement in PER
static constexpr int m_interpolatorPhaseSteps = 4; // Higher than these two values will struggle to run in real-time
static constexpr float m_interpolatorTapsPerPhase = 3.5f; // without gaining much improvement in PER
bool m_blnInitialized;
bool m_blnRenderingVideo;

View File

@ -58,7 +58,7 @@ struct bitvect
for (int i = 0; i < nw; ++i)
v[i] = a.v[i];
if (M < N)
for (int i = a.NW; i < NW; ++i)
for (size_t i = a.NW; i < NW; ++i)
v[i] = 0;
if (M > N)
truncate_to_N();

View File

@ -458,6 +458,8 @@ struct s2_frame_transmitter : runnable
std::complex<T> *pout
)
{
(void)mcinfo;
std::complex<T> *pout0 = pout; // For sanity check
// PLHEADER: SOF AND PLSCODE
// EN 302 307-1 section 5.5.2 PL signalling
@ -2584,6 +2586,8 @@ struct s2_deinterleaver : runnable
static inline void split_symbol(const llr_ss &ps,
hard_sb accs[/*bps*/], int nacc)
{
(void)nacc;
if (MSB_FIRST)
{
for (int b = 0; b < BPS; ++b) {
@ -3833,10 +3837,6 @@ struct s2_fecdec_helper : runnable
// Receive a finished job.
void receive_frame(const helper_job *job)
{
// Read corrected frame from helper
const s2_pls *pls = &job->pls;
int iosize = (pls->framebits() / 8) * sizeof(ldpc_buf[0]);
// Non blocking read - will do the next time if no adata is available
if (job->h->m_worker->dataAvailable())
{
@ -4267,7 +4267,6 @@ private:
// 188 = waiting for CRC
uint8_t leftover[188];
static const int MAX_TS_PER_BBFRAME = fec_info::KBCH_MAX / 8 / 188 + 1;
bool locked;
pipereader<bbframe> in;
pipewriter<tspacket> out;
int current_state;

View File

@ -544,6 +544,7 @@ struct serializer : runnable
in(_in),
out(_out, nout)
{
(void)sch;
if (nin * sizeof(Tin) != nout * sizeof(Tout)) {
fail("serializer: incompatible sizes");
}

View File

@ -414,7 +414,6 @@ struct simple_agc : runnable
float gain = estimated ? out_rms / sqrtf(estimated) : 0;
pin = in.rd();
std::complex<T> *pout = out.wr();
float bwcomp = 1 - bw;
for (; pin < pend; ++pin, ++pout)
{

View File

@ -767,7 +767,7 @@ void DSCDemodGUI::customContextMenuRequested(QPoint pos)
QAction* sendAreaToMapAction = new QAction(QString("Display %1 on map").arg(address), tableContextMenu);
connect(sendAreaToMapAction, &QAction::triggered, this, [this, name, address, info]()->void {
sendAreaToMapFeature(name, address, info);
QTimer::singleShot(500, [this, name] {
QTimer::singleShot(500, [ name] {
FeatureWebAPIUtils::mapFind(name);
});
});
@ -776,7 +776,7 @@ void DSCDemodGUI::customContextMenuRequested(QPoint pos)
else
{
QAction* findAreaOnMapAction = new QAction(QString("Center map on %1").arg(address), tableContextMenu);
connect(findAreaOnMapAction, &QAction::triggered, this, [this, name]()->void {
connect(findAreaOnMapAction, &QAction::triggered, this, [ name]()->void {
FeatureWebAPIUtils::mapFind(name);
});
tableContextMenu->addAction(findAreaOnMapAction);
@ -814,7 +814,7 @@ void DSCDemodGUI::customContextMenuRequested(QPoint pos)
if (sampleSource)
{
QAction* tuneRxAction = new QAction(QString("Tune SSB Demod %1:%2 to %3").arg(deviceSetIndex).arg(chi).arg(rxFormatted), tableContextMenu);
connect(tuneRxAction, &QAction::triggered, this, [this, deviceSetIndex, chi, rxFreq, sampleSource]()->void {
connect(tuneRxAction, &QAction::triggered, this, [deviceSetIndex, chi, rxFreq, sampleSource]()->void {
int bw = sampleSource->getSampleRate();
quint64 cf = sampleSource->getCenterFrequency();

View File

@ -119,8 +119,6 @@ void EndOfTrainDemodSink::feed(const SampleVector::const_iterator& begin, const
void EndOfTrainDemodSink::processOneSample(Complex &ci)
{
Complex ca;
// FM demodulation
double magsqRaw;
Real deviation;

View File

@ -697,7 +697,7 @@ void FT8Demod::sendChannelSettings(
const FT8DemodSettings& settings,
bool force)
{
qDebug("FT8Demod::sendChannelSettings: %d pipes", pipes.size());
qDebug("FT8Demod::sendChannelSettings: %d pipes", (int)pipes.size());
for (const auto& pipe : pipes)
{

View File

@ -51,8 +51,9 @@ struct FT8DemodBandPreset
int m_channelOffset;
};
struct FT8DemodSettings
class FT8DemodSettings
{
public:
enum MessageCol {
MESSAGE_COL_UTC,
MESSAGE_COL_TYPE,

View File

@ -40,7 +40,6 @@ FT8DemodWorker::FT8Callback::FT8Callback(
) :
m_packing(packing),
m_periodTS(periodTS),
m_baseFrequency(baseFrequency),
m_name(name),
m_validCallsigns(nullptr)
{
@ -226,7 +225,7 @@ void FT8DemodWorker::processBuffer(int16_t *buffer, QDateTime periodTS)
m_ft8Decoder.wait(m_decoderTimeBudget + 1.0); // add one second to budget to force quit threads
qDebug("FT8DemodWorker::processBuffer: done: at %6.3f %d messages",
m_baseFrequency / 1000000.0, ft8Callback.getReportMessage()->getFT8Messages().size());
m_baseFrequency / 1000000.0, (int)ft8Callback.getReportMessage()->getFT8Messages().size());
if (m_reportingMessageQueue) {
m_reportingMessageQueue->push(new MsgReportFT8Messages(*ft8Callback.getReportMessage()));

View File

@ -84,7 +84,6 @@ private:
FT8::Packing& m_packing;
MsgReportFT8Messages *m_msgReportFT8Messages;
const QDateTime& m_periodTS;
qint64 m_baseFrequency;
QString m_name;
const QSet<QString> *m_validCallsigns;
};

View File

@ -1432,7 +1432,6 @@ void ILSDemodGUI::scanAvailableChannels()
MessagePipes& messagePipes = mainCore->getMessagePipes();
std::vector<DeviceSet*>& deviceSets = mainCore->getDeviceSets();
m_availableChannels.clear();
int deviceSetIndex = 0;
for (const auto& deviceSet : deviceSets)
{
@ -1465,7 +1464,6 @@ void ILSDemodGUI::scanAvailableChannels()
}
}
}
deviceSetIndex++;
}
}

View File

@ -31,7 +31,6 @@
ILSDemodSink::ILSDemodSink(ILSDemod *ilsDemod) :
m_spectrumSink(nullptr),
m_scopeSink(nullptr),
m_ilsDemod(ilsDemod),
m_channel(nullptr),
m_channelSampleRate(ILSDemodSettings::ILSDEMOD_CHANNEL_SAMPLE_RATE),
m_channelFrequencyOffset(0),
@ -51,6 +50,8 @@ ILSDemodSink::ILSDemodSink(ILSDemod *ilsDemod) :
m_audioFifo(48000),
m_sampleBufferIndex(0)
{
(void)ilsDemod;
m_audioBuffer.resize(1<<14);
m_audioBufferFill = 0;

View File

@ -96,7 +96,6 @@ private:
SpectrumVis* m_spectrumSink;
ScopeVis* m_scopeSink; // Scope GUI to display baseband waveform
ILSDemod *m_ilsDemod;
ILSDemodSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -28,7 +28,6 @@
#include "navtexdemodsink.h"
NavtexDemodSink::NavtexDemodSink(NavtexDemod *packetDemod) :
m_navtexDemod(packetDemod),
m_channelSampleRate(NavtexDemodSettings::NAVTEXDEMOD_CHANNEL_SAMPLE_RATE),
m_channelFrequencyOffset(0),
m_magsqSum(0.0f),
@ -38,6 +37,7 @@ NavtexDemodSink::NavtexDemodSink(NavtexDemod *packetDemod) :
m_exp(nullptr),
m_sampleBufferIndex(0)
{
(void)packetDemod;
m_magsq = 0.0;
m_sampleBuffer.resize(m_sampleBufferSize);

View File

@ -83,7 +83,6 @@ private:
};
ScopeVis* m_scopeSink; // Scope GUI to display baseband waveform
NavtexDemod *m_navtexDemod;
NavtexDemodSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -88,8 +88,6 @@ void PacketDemodSink::feed(const SampleVector::const_iterator& begin, const Samp
void PacketDemodSink::processOneSample(Complex &ci)
{
Complex ca;
// FM demodulation
double magsqRaw;
Real deviation;

View File

@ -30,7 +30,6 @@
PagerDemodSink::PagerDemodSink(PagerDemod *pagerDemod) :
m_scopeSink(nullptr),
m_pagerDemod(pagerDemod),
m_channelSampleRate(PagerDemodSettings::m_channelSampleRate),
m_channelFrequencyOffset(0),
m_magsqSum(0.0f),
@ -50,6 +49,8 @@ PagerDemodSink::PagerDemodSink(PagerDemod *pagerDemod) :
m_addressValid(0),
m_sampleBufferIndex(0)
{
(void)pagerDemod;
m_magsq = 0.0;
m_demodBuffer.resize(1<<12);

View File

@ -88,7 +88,6 @@ private:
};
ScopeVis* m_scopeSink; // Scope GUI to display debug waveforms
PagerDemod *m_pagerDemod;
PagerDemodSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -29,7 +29,6 @@
#include "rttydemodsink.h"
RttyDemodSink::RttyDemodSink(RttyDemod *packetDemod) :
m_rttyDemod(packetDemod),
m_channelSampleRate(RttyDemodSettings::RTTYDEMOD_CHANNEL_SAMPLE_RATE),
m_channelFrequencyOffset(0),
m_magsqSum(0.0f),
@ -48,6 +47,8 @@ RttyDemodSink::RttyDemodSink(RttyDemod *packetDemod) :
m_fftCounter(0),
m_sampleBufferIndex(0)
{
(void)packetDemod;
m_magsq = 0.0;
m_sampleBuffer.resize(m_sampleBufferSize);

View File

@ -83,7 +83,6 @@ private:
};
ScopeVis* m_scopeSink; // Scope GUI to display baseband waveform
RttyDemod *m_rttyDemod;
RttyDemodSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -752,7 +752,7 @@ void SSBDemod::sendChannelSettings(
const SSBDemodSettings& settings,
bool force)
{
qDebug("SSBDemod::sendChannelSettings: %d pipes", pipes.size());
qDebug("SSBDemod::sendChannelSettings: %d pipes", (int)pipes.size());
for (const auto& pipe : pipes)
{

View File

@ -105,7 +105,6 @@ private:
MagSqLevelsStore m_magSqLevelStore;
MessageQueue *m_messageQueueToChannel;
MessageQueue *m_messageQueueToGUI;
MovingAverageUtil<Real, double, 16> m_movingAverage;
SimpleAGC<4800> m_volumeAGC;

View File

@ -73,7 +73,6 @@ private:
unsigned int m_nbCaptures;
SampleSimpleFifo m_preRecordBuffer;
unsigned int m_preRecordFill;
float m_squelchLevel;
SpectrumVis* m_spectrumSink;
MessageQueue *m_msgQueueToGUI;
bool m_recordEnabled;

View File

@ -389,7 +389,6 @@ private:
qint64 m_activeFrequency;
QDateTime m_minFFTStartTime;
int m_scannerSampleRate;
bool m_stepping;
qint64 m_stepStartFrequency;
qint64 m_stepStopFrequency;
QList<MsgScanResult::ScanResult> m_scanResults;

View File

@ -27,7 +27,6 @@
#include "freqscannersink.h"
FreqScannerSink::FreqScannerSink(FreqScanner *ilsDemod) :
m_freqScanner(ilsDemod),
m_channel(nullptr),
m_channelSampleRate(48000),
m_channelFrequencyOffset(0),
@ -41,6 +40,8 @@ FreqScannerSink::FreqScannerSink(FreqScanner *ilsDemod) :
m_binsPerChannel(16),
m_averageCount(0)
{
(void)ilsDemod;
applySettings(m_settings, QStringList(), true);
applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, 16, 4, true);
}

View File

@ -50,7 +50,6 @@ public:
private:
FreqScanner *m_freqScanner;
FreqScannerSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -26,7 +26,6 @@
HeatMapSink::HeatMapSink(HeatMap *heatMap) :
m_scopeSink(nullptr),
m_heatMap(heatMap),
m_channelSampleRate(10000),
m_channelFrequencyOffset(0),
m_magsq(0.0),
@ -37,6 +36,8 @@ HeatMapSink::HeatMapSink(HeatMap *heatMap) :
m_sampleBufferSize(1000),
m_sampleBufferIndex(0)
{
(void)heatMap;
resetMagLevels();
m_sampleBuffer.resize(m_sampleBufferSize);

View File

@ -106,12 +106,10 @@ private:
};
ScopeVis* m_scopeSink; // Scope GUI to display filtered power
HeatMap *m_heatMap;
HeatMapSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;
int m_channelFrequencyOffset;
int m_sinkSampleRate;
NCO m_nco;
Interpolator m_interpolator;

View File

@ -53,6 +53,7 @@ void LocalSinkSettings::resetToDefaults()
m_reverseAPIChannelIndex = 0;
m_workspaceIndex = 0;
m_hidden = false;
m_maxFFTBands = 32;
}
QByteArray LocalSinkSettings::serialize() const
@ -94,7 +95,7 @@ QByteArray LocalSinkSettings::serialize() const
s.writeBool(24, m_reverseFilter);
s.writeU32(99, m_fftBands.size());
int i = 0;
uint32_t i = 0;
for (auto fftBand : m_fftBands)
{

View File

@ -42,7 +42,7 @@ struct LocalSinkSettings
uint32_t m_log2FFT;
FFTWindow::Function m_fftWindow;
bool m_reverseFilter;
static const uint32_t m_maxFFTBands = 20;
uint32_t m_maxFFTBands;
std::vector<std::pair<float, float>> m_fftBands;
int m_streamIndex; //!< MIMO channel. Not relevant when connected to SI (single Rx).
bool m_useReverseAPI;

View File

@ -26,7 +26,6 @@
#include "noisefiguresink.h"
NoiseFigureSink::NoiseFigureSink(NoiseFigure *noiseFigure) :
m_noiseFigure(noiseFigure),
m_channelSampleRate(48000),
m_fftSequence(-1),
m_fft(nullptr),
@ -39,6 +38,8 @@ NoiseFigureSink::NoiseFigureSink(NoiseFigure *noiseFigure) :
m_count(0),
m_enabled(false)
{
(void)noiseFigure;
m_magsq = 0.0;
applySettings(m_settings, true);

View File

@ -81,7 +81,6 @@ private:
double m_magsqPeak;
};
NoiseFigure *m_noiseFigure;
NoiseFigureSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -378,7 +378,7 @@ void RadioAstronomyGUI::addToPowerSeries(FFTMeasurement *fft, bool skipCalcs)
&& !((m_settings.m_powerYUnits == RadioAstronomySettings::PY_DBM) && (fft->m_tSys == 0.0f)) // dBm value not valid if temp is 0
)
{
qreal power;
qreal power = 0.0;
switch (m_settings.m_powerYData)
{
case RadioAstronomySettings::PY_POWER:

View File

@ -28,7 +28,6 @@
RadioClockSink::RadioClockSink(RadioClock *radioClock) :
m_scopeSink(nullptr),
m_radioClock(radioClock),
m_channelSampleRate(RadioClockSettings::RADIOCLOCK_CHANNEL_SAMPLE_RATE),
m_channelFrequencyOffset(0),
m_magsq(0.0),
@ -49,6 +48,8 @@ RadioClockSink::RadioClockSink(RadioClock *radioClock) :
m_sampleBufferIndex(0),
m_gotMarker(false)
{
(void)radioClock;
m_phaseDiscri.setFMScaling(RadioClockSettings::RADIOCLOCK_CHANNEL_SAMPLE_RATE / (2.0f * 20.0/M_PI));
applySettings(m_settings, true);
applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, true);

View File

@ -86,7 +86,6 @@ private:
};
ScopeVis* m_scopeSink; // Scope GUI to display debug waveforms
RadioClock *m_radioClock;
RadioClockSettings m_settings;
ChannelAPI *m_channel;
int m_channelSampleRate;

View File

@ -132,7 +132,6 @@ private:
bool m_running;
RemoteSinkSettings m_settings;
uint64_t m_centerFrequency;
int64_t m_frequencyOffset;
int m_basebandSampleRate;

View File

@ -178,7 +178,6 @@ private:
RemoteTCPSinkBaseband *m_basebandSink;
RemoteTCPSinkSettings m_settings;
uint64_t m_centerFrequency;
int m_basebandSampleRate;
QNetworkAccessManager *m_networkManager;

View File

@ -88,13 +88,13 @@ QString RemoteTCPSinkGUI::displayScaledF(float value, char type, int precision,
}
else
{
if (posValue < 1000) {
if (posValue < 1000.0f) {
return tr("%1").arg(QString::number(value, type, precision));
} else if (posValue < 1000000) {
} else if (posValue < 1000000.0f) {
return tr("%1%2").arg(QString::number(value / 1000.0, type, precision)).arg(showMult ? "k" : "");
} else if (posValue < 1000000000) {
} else if (posValue < 1000000000.0f) {
return tr("%1%2").arg(QString::number(value / 1000000.0, type, precision)).arg(showMult ? "M" : "");
} else if (posValue < 1000000000000) {
} else if (posValue < 1000000000000.0f) {
return tr("%1%2").arg(QString::number(value / 1000000000.0, type, precision)).arg(showMult ? "G" : "");
} else {
return tr("%1").arg(QString::number(value, 'e', precision));

View File

@ -71,7 +71,6 @@ private:
SigMFFileRecord m_fileSink;
SampleSimpleFifo m_preRecordBuffer;
unsigned int m_preRecordFill;
float m_squelchLevel;
SpectrumVis* m_spectrumSink;
MessageQueue *m_msgQueueToGUI;
bool m_recordEnabled;

View File

@ -54,8 +54,7 @@ FileSource::FileSource(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource),
m_deviceAPI(deviceAPI),
m_frequencyOffset(0),
m_basebandSampleRate(0),
m_linearGain(0.0)
m_basebandSampleRate(0)
{
setObjectName(m_channelId);

View File

@ -235,7 +235,6 @@ private:
QRecursiveMutex m_settingsMutex;
uint64_t m_frequencyOffset;
uint32_t m_basebandSampleRate;
double m_linearGain;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;

View File

@ -37,11 +37,9 @@ FileSourceSource::FileSourceSource() :
m_fileName("..."),
m_sampleSize(0),
m_centerFrequency(0),
m_frequencyOffset(0),
m_fileSampleRate(0),
m_samplesCount(0),
m_sampleRate(0),
m_deviceSampleRate(0),
m_recordLengthMuSec(0),
m_startingTimeStamp(0),
m_running(false),

View File

@ -92,19 +92,15 @@ private:
double m_magsqPeak;
};
int m_channelSampleRate;
int m_channelFrequencyOffset;
FileSourceSettings m_settings;
std::ifstream m_ifstream;
QString m_fileName;
quint32 m_sampleSize;
quint64 m_centerFrequency;
int64_t m_frequencyOffset;
uint32_t m_fileSampleRate;
quint64 m_samplesCount;
uint32_t m_sampleRate;
uint32_t m_deviceSampleRate;
quint64 m_recordLengthMuSec; //!< record length in microseconds computed from file size
quint64 m_startingTimeStamp;
QTimer m_masterTimer;

View File

@ -273,8 +273,6 @@ int DVB2::next_ts_frame_base( u8 *ts )
}
DVB2::DVB2(void)
{
// Clear the transport queue
m_tp_q.empty();
init_bb_randomiser();
bch_poly_build_tables();
build_crc8_table();

View File

@ -130,7 +130,7 @@ void M17ModSource::pullOne(Sample& sample)
void M17ModSource::prefetch(unsigned int nbSamples)
{
if ((m_settings.m_m17Mode == M17ModSettings::M17ModeFMAudio))
if (m_settings.m_m17Mode == M17ModSettings::M17ModeFMAudio)
{
unsigned int nbSamplesAudio = nbSamples * ((Real) m_audioSampleRate / (Real) m_channelSampleRate);
pullAudio(nbSamplesAudio);

View File

@ -33,7 +33,6 @@ public:
int next(); //!< +1/-1 sample
private:
int m_shift; //!< current frequency shift: -1 or 1
int m_dcsWord[23]; //!< current DCS word in transmit order including parity and filler 11 + 3 + 9
float m_step;
bool m_positive;

View File

@ -59,7 +59,6 @@ PacketMod::PacketMod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource),
m_deviceAPI(deviceAPI),
m_spectrumVis(SDR_TX_SCALEF),
m_sampleRate(48000),
m_udpSocket(nullptr)
{
setObjectName(m_channelId);

View File

@ -229,8 +229,6 @@ private:
SampleVector m_sampleBuffer;
QRecursiveMutex m_settingsMutex;
int m_sampleRate;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
QUdpSocket *m_udpSocket;

View File

@ -55,7 +55,6 @@ PSK31::PSK31(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource),
m_deviceAPI(deviceAPI),
m_spectrumVis(SDR_TX_SCALEF),
m_sampleRate(48000),
m_udpSocket(nullptr)
{
setObjectName(m_channelId);

View File

@ -214,8 +214,6 @@ private:
SampleVector m_sampleBuffer;
QRecursiveMutex m_settingsMutex;
int m_sampleRate;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
QUdpSocket *m_udpSocket;

View File

@ -55,7 +55,6 @@ RttyMod::RttyMod(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSource),
m_deviceAPI(deviceAPI),
m_spectrumVis(SDR_TX_SCALEF),
m_sampleRate(48000),
m_udpSocket(nullptr)
{
setObjectName(m_channelId);

View File

@ -214,8 +214,6 @@ private:
SampleVector m_sampleBuffer;
QRecursiveMutex m_settingsMutex;
int m_sampleRate;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
QUdpSocket *m_udpSocket;

View File

@ -60,6 +60,7 @@ InputController* InputControllerManager::open(const QString& name)
#ifdef QT_GAMEPAD_FOUND
return GamepadInputController::open(name);
#else
(void)name;
return nullptr;
#endif
}

View File

@ -1824,6 +1824,7 @@ void MapGUI::applyMap3DSettings(bool reloadMap)
m_imageMapModel.allUpdated();
m_polygonMapModel.allUpdated();
m_polylineMapModel.allUpdated();
(void)reloadMap;
#endif
}

View File

@ -695,7 +695,6 @@ double StarTracker::applyBeam(const FITS *fits, double beamwidth, double ra, dou
numberOfCoeffsV++;
}
double *beam = new double[numberOfCoeffsH*numberOfCoeffsV];
double sum = 0.0;
int y0 = numberOfCoeffsV/2;
int x0 = numberOfCoeffsH/2;
int nonZeroCount = 0;
@ -709,7 +708,6 @@ double StarTracker::applyBeam(const FITS *fits, double beamwidth, double ra, dou
if (r < halfBeamwidth)
{
beam[y*numberOfCoeffsH+x] = pow(cos(Units::degreesToRadians(r)), p);
sum += beam[y*numberOfCoeffsH+x];
nonZeroCount++;
}
else

View File

@ -25,7 +25,8 @@
#include "audio/audiodeviceinfo.h"
#include "util/message.h"
struct AudioCATSISOSettings {
class AudioCATSISOSettings{
public:
class MsgPTT : public Message {
MESSAGE_CLASS_DECLARATION

View File

@ -483,7 +483,7 @@ void MetisMISOUDPHandler::processIQBuffer(unsigned char* buffer)
{
int b = 0;
unsigned int r;
int sampleI, sampleQ, sampleMic;
int sampleI, sampleQ;
if (buffer[b++]==0x7F && buffer[b++]==0x7F && buffer[b++]==0x7F)
@ -622,8 +622,9 @@ void MetisMISOUDPHandler::processIQBuffer(unsigned char* buffer)
}
}
sampleMic = (int)((signed char) buffer[b++]) << 8;
sampleMic += (int)((unsigned char)buffer[b++]);
// sampleMic
b+=2;
m_sampleTxCount++;
if (m_sampleTxCount >= 63) // 63 samples per 512 byte Tx block

View File

@ -116,8 +116,6 @@ void RemoteOutputWorker::tick()
m_throttleToggle = !m_throttleToggle;
}
SampleVector::iterator readUntil;
SampleVector& data = m_sampleFifo->getData();
unsigned int iPart1Begin, iPart1End, iPart2Begin, iPart2End;
m_sampleFifo->read(m_samplesChunkSize, iPart1Begin, iPart1End, iPart2Begin, iPart2End);

View File

@ -35,6 +35,9 @@
#include "androidsdrdriverinput.h"
#include "androidsdrdriverinputtcphandler.h"
#ifdef ANDROID
#include "util/android.h"
#endif
MESSAGE_CLASS_DEFINITION(AndroidSDRDriverInput::MsgConfigureAndroidSDRDriverInput, Message)
MESSAGE_CLASS_DEFINITION(AndroidSDRDriverInput::MsgStartStop, Message)

View File

@ -27,6 +27,7 @@
#include <QDateTime>
#include "util/messagequeue.h"
#include "util/message.h"
#include "androidsdrdriverinputsettings.h"
#include "../../channelrx/remotetcpsink/remotetcpprotocol.h"

View File

@ -40,8 +40,6 @@ const PluginDescriptor FCDProPlusPlugin::m_pluginDescriptor = {
QStringLiteral("https://github.com/f4exb/sdrangel")
};
static constexpr const char* const m_deviceTypeID = FCDPROPLUS_DEVICE_TYPE_ID;
FCDProPlusPlugin::FCDProPlusPlugin(QObject* parent) :
QObject(parent)
{

View File

@ -27,6 +27,9 @@
#include <iostream>
#include <fstream>
#include <cstdlib>
#ifdef ANDROID
#include <QFile>
#endif
#include "util/message.h"

View File

@ -64,8 +64,9 @@ struct SigMFFileDataType
}
};
struct SigMFFileMetaInfo
class SigMFFileMetaInfo
{
public:
// core
QString m_dataTypeStr;
SigMFFileDataType m_dataType;
@ -153,8 +154,9 @@ struct SigMFFileMetaInfo
}
};
struct SigMFFileCapture
class SigMFFileCapture
{
public:
uint64_t m_tsms; //!< Unix timestamp in milliseconds
uint64_t m_centerFrequency; //!< Center frequency in Hz
uint64_t m_sampleStart; //!< Sample index at which capture start

View File

@ -625,8 +625,8 @@ void SigMFFileInputWorker::writeToSampleFifoBAK(const quint8* buf, qint32 nbByte
nbSamples = nbBytes / (2 * m_samplebytes);
for (int is = 0; is < nbSamples; is++)
{
convertBuf[2*is] = fileBuf[2*is] >> (SDR_RX_SAMP_SZ == 24) ? 8 : 16;
convertBuf[2*is+1] = fileBuf[2*is+1] >> (SDR_RX_SAMP_SZ == 24) ? 8 : 16;
convertBuf[2*is] = fileBuf[2*is] >> ((SDR_RX_SAMP_SZ == 24) ? 8 : 16);
convertBuf[2*is+1] = fileBuf[2*is+1] >> ((SDR_RX_SAMP_SZ == 24) ? 8 : 16);
}
}
else
@ -634,7 +634,7 @@ void SigMFFileInputWorker::writeToSampleFifoBAK(const quint8* buf, qint32 nbByte
nbSamples = nbBytes / m_samplebytes;
for (int is = 0; is < nbSamples; is++)
{
convertBuf[2*is] = fileBuf[is] >> (SDR_RX_SAMP_SZ == 24) ? 8 : 16;
convertBuf[2*is] = fileBuf[is] >> ((SDR_RX_SAMP_SZ == 24) ? 8 : 16);
convertBuf[2*is+1] = 0;
}
}
@ -715,9 +715,9 @@ void SigMFFileInputWorker::writeToSampleFifoBAK(const quint8* buf, qint32 nbByte
nbSamples = nbBytes / (2 * m_samplebytes);
for (int is = 0; is < nbSamples; is++)
{
convertBuf[2*is] = (fileBuf[2*is] >> (SDR_RX_SAMP_SZ == 24) ? 8 : 16)
convertBuf[2*is] = (fileBuf[2*is] >> ((SDR_RX_SAMP_SZ == 24) ? 8 : 16))
- ((SDR_RX_SAMP_SZ == 24) ? (1<<23) : (1<<15));
convertBuf[2*is+1] = (fileBuf[2*is+1] >> (SDR_RX_SAMP_SZ == 24) ? 8 : 16)
convertBuf[2*is+1] = (fileBuf[2*is+1] >> ((SDR_RX_SAMP_SZ == 24) ? 8 : 16))
- ((SDR_RX_SAMP_SZ == 24) ? (1<<23) : (1<<15));;
}
}
@ -726,7 +726,7 @@ void SigMFFileInputWorker::writeToSampleFifoBAK(const quint8* buf, qint32 nbByte
nbSamples = nbBytes / m_samplebytes;
for (int is = 0; is < nbSamples; is++)
{
convertBuf[2*is] = (fileBuf[is] >> (SDR_RX_SAMP_SZ == 24) ? 8 : 16)
convertBuf[2*is] = (fileBuf[is] >> ((SDR_RX_SAMP_SZ == 24) ? 8 : 16))
- ((SDR_RX_SAMP_SZ == 24) ? (1<<23) : (1<<15));
convertBuf[2*is+1] = 0;
}

View File

@ -66,7 +66,7 @@ uint32_t RTPRandom::PickSeed()
#else
x += (uint32_t)clock();
#endif
x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0);
x ^= (uint32_t)(size_t)this;
return x;
}

View File

@ -143,7 +143,7 @@ bool AudioInputDevice::start(int device, int rate)
if (m_audioInput->state() != QAudio::ActiveState) {
qWarning("AudioInputDevice::start: cannot start");
} else {
qDebug("AudioInputDevice::start: started buffer: %d bytes", m_audioInput->bufferSize());
qDebug("AudioInputDevice::start: started buffer: %d bytes", (int)m_audioInput->bufferSize());
}
// }

View File

@ -176,7 +176,7 @@ bool AudioOutputDevice::start(int deviceIndex, int sampleRate)
if (m_audioOutput->state() != QAudio::ActiveState) {
qWarning() << "AudioOutputDevice::start: cannot start - " << m_audioOutput->error();
} else {
qDebug("AudioOutputDevice::start: started buffer: %d bytes", m_audioOutput->bufferSize());
qDebug("AudioOutputDevice::start: started buffer: %d bytes", (int)m_audioOutput->bufferSize());
}
if (m_managerMessageQueue) {

View File

@ -22,6 +22,7 @@
#include "util/uid.h"
#include "channelapi.h"
#include "util/message.h"
ChannelAPI::ChannelAPI(const QString& uri, StreamType streamType) :
m_guiMessageQueue(nullptr),

View File

@ -423,7 +423,7 @@ void MainCore::positionError(QGeoPositionInfoSource::Error positioningError)
void MainCore::updateWakeLock()
{
bool running = false;
for (int i = 0; i < m_deviceSets.size(); i++)
for (size_t i = 0; i < m_deviceSets.size(); i++)
{
if (m_deviceSets[i]->m_deviceAPI->state() == DeviceAPI::StRunning)
{

View File

@ -34,7 +34,7 @@ QObject *DataFifoStore::createElement()
{
DataFifo *fifo = new DataFifo();
m_dataFifos.push_back(fifo);
qDebug("DataFifoStore::createElement: %d added", m_dataFifos.size() - 1);
qDebug("DataFifoStore::createElement: %d added", (int)m_dataFifos.size() - 1);
return fifo;
}

View File

@ -34,7 +34,7 @@ QObject *MessageQueueStore::createElement()
{
MessageQueue *messageQueue = new MessageQueue();
m_messageQueues.push_back(messageQueue);
qDebug("MessageQueueStore::createElement: %d added", m_messageQueues.size() - 1);
qDebug("MessageQueueStore::createElement: %d added", (int)m_messageQueues.size() - 1);
return messageQueue;
}

View File

@ -519,7 +519,6 @@ void TPLinkDeviceDiscoverer::handleReply(QNetworkReply* reply)
if (sysInfoObj.contains(QStringLiteral("child_num")))
{
QJsonArray children = sysInfoObj.value(QStringLiteral("children")).toArray();
int child = 1;
for (auto childRef : children)
{
QJsonObject childObj = childRef.toObject();
@ -530,7 +529,6 @@ void TPLinkDeviceDiscoverer::handleReply(QNetworkReply* reply)
}
controlInfo->m_type = DeviceDiscoverer::BOOL;
info.m_controls.append(controlInfo);
child++;
}
}
else if (sysInfoObj.contains(QStringLiteral("relay_state")))

View File

@ -233,12 +233,6 @@ QSize FeatureLayout::doLayoutVertically(const QRect &rect, bool testOnly) const
int lineHeight = 0;
int spaceX = 0;
int spaceY = 0;
// Calculate space available for rows of widgets
int maxHeightForRows = effectiveRect.height();
if (itemList.size() > 0) {
maxHeightForRows -= itemList[0]->minimumSize().height();
}
int minWidth = 0;
int i = 0;

Some files were not shown because too many files have changed in this diff Show More