Fixed -Wsign-compare warnings

This commit is contained in:
f4exb 2020-11-14 22:08:06 +01:00
parent 6285235257
commit 9bd8e9c34e
46 changed files with 137 additions and 138 deletions

View File

@ -24,11 +24,11 @@ void DeviceMetisScan::scan()
{ {
m_scans.clear(); m_scans.clear();
if (m_udpSocket.bind(QHostAddress::AnyIPv4, 10001, QUdpSocket::ShareAddress)) if (m_udpSocket.bind(QHostAddress::AnyIPv4, 10001, QUdpSocket::ShareAddress))
{ {
connect(&m_udpSocket, SIGNAL(readyRead()), this, SLOT(readyRead())); connect(&m_udpSocket, SIGNAL(readyRead()), this, SLOT(readyRead()));
} }
else else
{ {
qDebug() << "DeviceMetisScan::scan: cannot bind socket"; qDebug() << "DeviceMetisScan::scan: cannot bind socket";
return; return;
@ -40,7 +40,7 @@ void DeviceMetisScan::scan()
buffer[2] = (unsigned char) 0x02; buffer[2] = (unsigned char) 0x02;
std::fill(&buffer[3], &buffer[63], 0); std::fill(&buffer[3], &buffer[63], 0);
if (m_udpSocket.writeDatagram((const char*) buffer, sizeof(buffer), QHostAddress::Broadcast, 1024) < 0) if (m_udpSocket.writeDatagram((const char*) buffer, sizeof(buffer), QHostAddress::Broadcast, 1024) < 0)
{ {
qDebug() << "DeviceMetisScan::scan: discovery writeDatagram failed " << m_udpSocket.errorString(); qDebug() << "DeviceMetisScan::scan: discovery writeDatagram failed " << m_udpSocket.errorString();
return; return;
@ -59,7 +59,7 @@ void DeviceMetisScan::scan()
qDebug() << "DeviceMetisScan::scan: start 0.5 second timeout loop"; qDebug() << "DeviceMetisScan::scan: start 0.5 second timeout loop";
// Execute the event loop here and wait for the timeout to trigger // Execute the event loop here and wait for the timeout to trigger
// which in turn will trigger event loop quit. // which in turn will trigger event loop quit.
loop.exec(); loop.exec();
disconnect(&m_udpSocket, SIGNAL(readyRead()), this, SLOT(readyRead())); disconnect(&m_udpSocket, SIGNAL(readyRead()), this, SLOT(readyRead()));
m_udpSocket.close(); m_udpSocket.close();
@ -81,11 +81,11 @@ void DeviceMetisScan::enumOriginDevices(const QString& hardwareId, PluginInterfa
i, // sequence i, // sequence
8, // Nb Rx 8, // Nb Rx
1 // Nb Tx 1 // Nb Tx
)); ));
} }
} }
const DeviceMetisScan::DeviceScan* DeviceMetisScan::getDeviceAt(unsigned int index) const const DeviceMetisScan::DeviceScan* DeviceMetisScan::getDeviceAt(int index) const
{ {
if (index < m_scans.size()) { if (index < m_scans.size()) {
return &m_scans.at(index); return &m_scans.at(index);
@ -97,7 +97,7 @@ const DeviceMetisScan::DeviceScan* DeviceMetisScan::getDeviceAt(unsigned int ind
void DeviceMetisScan::getSerials(QList<QString>& serials) const void DeviceMetisScan::getSerials(QList<QString>& serials) const
{ {
for (int i = 0; i < m_scans.size(); i++) { for (int i = 0; i < m_scans.size(); i++) {
serials.append(m_scans.at(i).m_serial); serials.append(m_scans.at(i).m_serial);
} }
} }
@ -107,17 +107,17 @@ void DeviceMetisScan::readyRead()
quint16 metisPort; quint16 metisPort;
unsigned char buffer[1024]; unsigned char buffer[1024];
if (m_udpSocket.readDatagram((char*) &buffer, (qint64) sizeof(buffer), &metisAddress, &metisPort) < 0) if (m_udpSocket.readDatagram((char*) &buffer, (qint64) sizeof(buffer), &metisAddress, &metisPort) < 0)
{ {
qDebug() << "DeviceMetisScan::readyRead: readDatagram failed " << m_udpSocket.errorString(); qDebug() << "DeviceMetisScan::readyRead: readDatagram failed " << m_udpSocket.errorString();
return; return;
} }
QString metisIP = QString("%1:%2").arg(metisAddress.toString()).arg(metisPort); QString metisIP = QString("%1:%2").arg(metisAddress.toString()).arg(metisPort);
if (buffer[0] == 0xEF && buffer[1] == 0xFE) if (buffer[0] == 0xEF && buffer[1] == 0xFE)
{ {
switch(buffer[2]) switch(buffer[2])
{ {
case 3: // reply case 3: // reply
// should not happen on this port // should not happen on this port
@ -138,9 +138,9 @@ void DeviceMetisScan::readyRead()
case 1: // a data packet case 1: // a data packet
break; break;
} }
} }
else else
{ {
qDebug() << "DeviceMetisScan::readyRead: received invalid response to discovery"; qDebug() << "DeviceMetisScan::readyRead: received invalid response to discovery";
} }
} }

View File

@ -54,7 +54,7 @@ public:
void scan(); void scan();
int getNbDevices() const { return m_scans.size(); } int getNbDevices() const { return m_scans.size(); }
const DeviceScan* getDeviceAt(unsigned int index) const; const DeviceScan* getDeviceAt(int index) const;
void getSerials(QList<QString>& serials) const; void getSerials(QList<QString>& serials) const;
void enumOriginDevices(const QString& hardwareId, PluginInterface::OriginDevices& originDevices); void enumOriginDevices(const QString& hardwareId, PluginInterface::OriginDevices& originDevices);

View File

@ -160,9 +160,9 @@ InterferometerCorrelator::~InterferometerCorrelator()
bool InterferometerCorrelator::performCorr( bool InterferometerCorrelator::performCorr(
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1 unsigned int size1
) )
{ {
bool results = false; bool results = false;
@ -308,9 +308,9 @@ bool InterferometerCorrelator::performCorr(
bool InterferometerCorrelator::performOpCorr( bool InterferometerCorrelator::performOpCorr(
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1, unsigned int size1,
Sample sampleOp(const Sample& a, const Sample& b) Sample sampleOp(const Sample& a, const Sample& b)
) )
{ {
@ -333,9 +333,9 @@ bool InterferometerCorrelator::performOpCorr(
bool InterferometerCorrelator::performIFFTCorr( bool InterferometerCorrelator::performIFFTCorr(
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1, unsigned int size1,
bool star bool star
) )
{ {
@ -457,9 +457,9 @@ bool InterferometerCorrelator::performIFFTCorr(
bool InterferometerCorrelator::performIFFT2Corr( bool InterferometerCorrelator::performIFFT2Corr(
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1 unsigned int size1
) )
{ {
unsigned int size = std::min(size0, size1); unsigned int size = std::min(size0, size1);
@ -566,9 +566,9 @@ bool InterferometerCorrelator::performIFFT2Corr(
bool InterferometerCorrelator::performFFTProd( bool InterferometerCorrelator::performFFTProd(
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1 unsigned int size1
) )
{ {
unsigned int size = std::min(size0, size1); unsigned int size = std::min(size0, size1);

View File

@ -39,9 +39,9 @@ public:
InterferometerSettings::CorrelationType getCorrType() const { return m_corrType; } InterferometerSettings::CorrelationType getCorrType() const { return m_corrType; }
bool performCorr( //!< Returns true if results were produced bool performCorr( //!< Returns true if results were produced
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1 unsigned int size1
); );
int getFullFFTSize() const { return 2*m_fftSize; } int getFullFFTSize() const { return 2*m_fftSize; }
void setPhase(int phase); void setPhase(int phase);
@ -57,35 +57,35 @@ signals:
private: private:
bool performOpCorr( //!< Returns true if results were produced bool performOpCorr( //!< Returns true if results were produced
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1, unsigned int size1,
Sample sampleOp(const Sample& a, const Sample& b) Sample sampleOp(const Sample& a, const Sample& b)
); );
bool performIFFTCorr( //!< Returns true if results were produced bool performIFFTCorr( //!< Returns true if results were produced
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1, unsigned int size1,
bool star = false bool star = false
); );
bool performIFFT2Corr( //!< Returns true if results were produced bool performIFFT2Corr( //!< Returns true if results were produced
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1 unsigned int size1
); );
bool performFFTProd( //!< Returns true if results were produced bool performFFTProd( //!< Returns true if results were produced
const SampleVector& data0, const SampleVector& data0,
int size0, unsigned int size0,
const SampleVector& data1, const SampleVector& data1,
int size1 unsigned int size1
); );
void adjustSCorrSize(int size); void adjustSCorrSize(int size);
void adjustTCorrSize(int size); void adjustTCorrSize(int size);
InterferometerSettings::CorrelationType m_corrType; InterferometerSettings::CorrelationType m_corrType;
int m_fftSize; //!< FFT length unsigned int m_fftSize; //!< FFT length
FFTEngine *m_fft[2]; //!< FFT engines (double FFT) FFTEngine *m_fft[2]; //!< FFT engines (double FFT)
FFTEngine *m_invFFT; //!< Inverse FFT engine (double FFT) FFTEngine *m_invFFT; //!< Inverse FFT engine (double FFT)
FFTEngine *m_fft2[2]; //!< FFT engines FFTEngine *m_fft2[2]; //!< FFT engines

View File

@ -186,7 +186,7 @@ void ADSBDemodSinkWorker::run()
if ((df == 17) || (df == 18)) if ((df == 17) || (df == 18))
{ {
m_crc.init(); m_crc.init();
int parity = (data[11] << 16) | (data[12] << 8) | data[13]; // Parity / CRC unsigned int parity = (data[11] << 16) | (data[12] << 8) | data[13]; // Parity / CRC
m_crc.calculate(data, ADS_B_ES_BYTES-3); m_crc.calculate(data, ADS_B_ES_BYTES-3);
if (parity == m_crc.get()) if (parity == m_crc.get())

View File

@ -95,7 +95,7 @@ private:
Real m_interpolatorDistanceRemain; Real m_interpolatorDistanceRemain;
Real m_squelchLevel; Real m_squelchLevel;
uint32_t m_squelchCount; int m_squelchCount;
bool m_squelchOpen; bool m_squelchOpen;
DoubleBufferFIFO<Real> m_squelchDelayLine; DoubleBufferFIFO<Real> m_squelchDelayLine;
double m_magsq; double m_magsq;
@ -123,4 +123,4 @@ private:
void processOneSample(Complex &ci); void processOneSample(Complex &ci);
}; };
#endif // INCLUDE_AMDEMODSINK_H #endif // INCLUDE_AMDEMODSINK_H

View File

@ -111,12 +111,12 @@ QByteArray ChirpChatDemodSettings::serialize() const
s.writeS32(8, m_codingScheme); s.writeS32(8, m_codingScheme);
s.writeBool(9, m_decodeActive); s.writeBool(9, m_decodeActive);
s.writeS32(10, m_eomSquelchTenths); s.writeS32(10, m_eomSquelchTenths);
s.writeS32(11, m_nbSymbolsMax); s.writeU32(11, m_nbSymbolsMax);
s.writeS32(12, m_packetLength); s.writeS32(12, m_packetLength);
s.writeS32(13, m_nbParityBits); s.writeS32(13, m_nbParityBits);
s.writeBool(14, m_hasCRC); s.writeBool(14, m_hasCRC);
s.writeBool(15, m_hasHeader); s.writeBool(15, m_hasHeader);
s.writeS32(17, m_preambleChirps); s.writeU32(17, m_preambleChirps);
s.writeS32(18, (int) m_fftWindow); s.writeS32(18, (int) m_fftWindow);
s.writeBool(20, m_useReverseAPI); s.writeBool(20, m_useReverseAPI);
s.writeString(21, m_reverseAPIAddress); s.writeString(21, m_reverseAPIAddress);
@ -167,12 +167,12 @@ bool ChirpChatDemodSettings::deserialize(const QByteArray& data)
m_codingScheme = (CodingScheme) tmp; m_codingScheme = (CodingScheme) tmp;
d.readBool(9, &m_decodeActive, true); d.readBool(9, &m_decodeActive, true);
d.readS32(10, &m_eomSquelchTenths, 60); d.readS32(10, &m_eomSquelchTenths, 60);
d.readS32(11, &m_nbSymbolsMax, 255); d.readU32(11, &m_nbSymbolsMax, 255);
d.readS32(12, &m_packetLength, 32); d.readS32(12, &m_packetLength, 32);
d.readS32(13, &m_nbParityBits, 1); d.readS32(13, &m_nbParityBits, 1);
d.readBool(14, &m_hasCRC, true); d.readBool(14, &m_hasCRC, true);
d.readBool(15, &m_hasHeader, true); d.readBool(15, &m_hasHeader, true);
d.readS32(17, &m_preambleChirps, 8); d.readU32(17, &m_preambleChirps, 8);
d.readS32(18, &tmp, (int) FFTWindow::Rectangle); d.readS32(18, &tmp, (int) FFTWindow::Rectangle);
m_fftWindow = (FFTWindow::Function) tmp; m_fftWindow = (FFTWindow::Function) tmp;
d.readBool(20, &m_useReverseAPI, false); d.readBool(20, &m_useReverseAPI, false);
@ -223,4 +223,4 @@ unsigned int ChirpChatDemodSettings::getNbSFDFourths() const
bool ChirpChatDemodSettings::hasSyncWord() const bool ChirpChatDemodSettings::hasSyncWord() const
{ {
return m_codingScheme == CodingLoRa; return m_codingScheme == CodingLoRa;
} }

View File

@ -44,17 +44,17 @@ struct ChirpChatDemodSettings
FFTWindow::Function m_fftWindow; FFTWindow::Function m_fftWindow;
CodingScheme m_codingScheme; CodingScheme m_codingScheme;
bool m_decodeActive; bool m_decodeActive;
int m_eomSquelchTenths; //!< Squelch factor to trigger end of message (/10) int m_eomSquelchTenths; //!< Squelch factor to trigger end of message (/10)
int m_nbSymbolsMax; //!< Maximum number of symbols in a payload unsigned int m_nbSymbolsMax; //!< Maximum number of symbols in a payload
bool m_autoNbSymbolsMax; //!< Set maximum number of symbols in a payload automatically using last messag value bool m_autoNbSymbolsMax; //!< Set maximum number of symbols in a payload automatically using last messag value
int m_preambleChirps; //!< Number of expected preamble chirps unsigned int m_preambleChirps; //!< Number of expected preamble chirps
int m_nbParityBits; //!< Hamming parity bits (LoRa) int m_nbParityBits; //!< Hamming parity bits (LoRa)
int m_packetLength; //!< Payload packet length in bytes or characters (LoRa) int m_packetLength; //!< Payload packet length in bytes or characters (LoRa)
bool m_hasCRC; //!< Payload has CRC (LoRa) bool m_hasCRC; //!< Payload has CRC (LoRa)
bool m_hasHeader; //!< Header present before actual payload (LoRa) bool m_hasHeader; //!< Header present before actual payload (LoRa)
bool m_sendViaUDP; //!< Send decoded message via UDP bool m_sendViaUDP; //!< Send decoded message via UDP
QString m_udpAddress; //!< UDP address where to send message QString m_udpAddress; //!< UDP address where to send message
uint16_t m_udpPort; //!< UDP port where to send message uint16_t m_udpPort; //!< UDP port where to send message
uint32_t m_rgbColor; uint32_t m_rgbColor;
QString m_title; QString m_title;
int m_streamIndex; int m_streamIndex;

View File

@ -117,7 +117,7 @@ void ChirpChatDemodSink::initSF(unsigned int sf, unsigned int deBits, FFTWindow:
float phase = -halfAngle; float phase = -halfAngle;
double accumulator = 0; double accumulator = 0;
for (int i = 0; i < m_fftLength; i++) for (unsigned int i = 0; i < m_fftLength; i++)
{ {
accumulator = fmod(accumulator + phase, 2*M_PI); accumulator = fmod(accumulator + phase, 2*M_PI);
m_downChirps[i] = Complex(std::conj(std::polar(1.0, accumulator))); m_downChirps[i] = Complex(std::conj(std::polar(1.0, accumulator)));
@ -191,7 +191,7 @@ void ChirpChatDemodSink::processSample(const Complex& ci)
m_argMaxHistoryCounter = 0; m_argMaxHistoryCounter = 0;
bool preambleFound = true; bool preambleFound = true;
for (int i = 1; i < m_requiredPreambleChirps; i++) for (unsigned int i = 1; i < m_requiredPreambleChirps; i++)
{ {
int delta = m_argMaxHistory[i] - m_argMaxHistory[i-1]; int delta = m_argMaxHistory[i] - m_argMaxHistory[i-1];
// qDebug("ChirpChatDemodSink::processSample: search: delta: %d / %d", delta, m_deLength); // qDebug("ChirpChatDemodSink::processSample: search: delta: %d / %d", delta, m_deLength);
@ -314,7 +314,7 @@ void ChirpChatDemodSink::processSample(const Complex& ci)
int zadj; int zadj;
int sfdSkip = m_sfdSkip; int sfdSkip = m_sfdSkip;
for (int i = 0; i < m_chirpCount - 1 - (m_settings.hasSyncWord() ? 2 : 0); i++) for (unsigned int i = 0; i < m_chirpCount - 1 - (m_settings.hasSyncWord() ? 2 : 0); i++)
{ {
sadj += m_preambleHistory[i] > m_nbSymbols/2 ? m_preambleHistory[i] - m_nbSymbols : m_preambleHistory[i]; sadj += m_preambleHistory[i] > m_nbSymbols/2 ? m_preambleHistory[i] - m_nbSymbols : m_preambleHistory[i];
nadj++; nadj++;

View File

@ -72,8 +72,8 @@ private:
int m_bandwidth; int m_bandwidth;
int m_channelSampleRate; int m_channelSampleRate;
int m_channelFrequencyOffset; int m_channelFrequencyOffset;
int m_chirp; unsigned int m_chirp;
int m_chirp0; unsigned int m_chirp0;
static const unsigned int m_requiredPreambleChirps = 4; //!< Number of chirps required to estimate preamble static const unsigned int m_requiredPreambleChirps = 4; //!< Number of chirps required to estimate preamble
static const unsigned int m_maxSFDSearchChirps = 8; //!< Maximum number of chirps when looking for SFD after preamble detection static const unsigned int m_maxSFDSearchChirps = 8; //!< Maximum number of chirps when looking for SFD after preamble detection
@ -143,4 +143,4 @@ private:
unsigned int evalSymbol(unsigned int rawSymbol); unsigned int evalSymbol(unsigned int rawSymbol);
}; };
#endif // INCLUDE_CHIRPCHATDEMODSINK_H #endif // INCLUDE_CHIRPCHATDEMODSINK_H

View File

@ -40,7 +40,7 @@ struct bitvect
bitvect(T val) bitvect(T val)
{ {
v[0] = val; v[0] = val;
for (int i = 1; i < NW; ++i) for (unsigned int i = 1; i < NW; ++i)
v[i] = 0; v[i] = 0;
} }
@ -139,7 +139,7 @@ bitvect<T, N> shiftdivmod(const Tm *m, size_t nm, const bitvect<T, N> &p,
T init = 0) T init = 0)
{ {
bitvect<T, N> res; bitvect<T, N> res;
for (int i = 0; i < res.NW; ++i) for (unsigned int i = 0; i < res.NW; ++i)
res.v[i] = init; res.v[i] = init;
const Tm bitmask = (Tm)1 << (sizeof(Tm) * 8 - 1); const Tm bitmask = (Tm)1 << (sizeof(Tm) * 8 - 1);
for (; nm--; ++m) for (; nm--; ++m)

View File

@ -171,7 +171,7 @@ struct s2_bbscrambling
s2_bbscrambling() s2_bbscrambling()
{ {
uint16_t st = 0x00a9; // 000 0000 1010 1001 (Fig 5 reversed) uint16_t st = 0x00a9; // 000 0000 1010 1001 (Fig 5 reversed)
for (int i = 0; i < sizeof(pattern); ++i) for (unsigned int i = 0; i < sizeof(pattern); ++i)
{ {
uint8_t out = 0; uint8_t out = 0;
for (int n = 8; n--;) for (int n = 8; n--;)

View File

@ -197,7 +197,7 @@ void SSBDemodGUI::on_audioMute_toggled(bool checked)
void SSBDemodGUI::on_spanLog2_valueChanged(int value) void SSBDemodGUI::on_spanLog2_valueChanged(int value)
{ {
unsigned int s2max = spanLog2Max(); int s2max = spanLog2Max();
if ((value < 0) || (value > s2max-1)) { if ((value < 0) || (value > s2max-1)) {
return; return;

View File

@ -385,7 +385,7 @@ void FreqTrackerSink::tick()
{ {
if ((m_settings.m_tracking) && getSquelchOpen()) if ((m_settings.m_tracking) && getSquelchOpen())
{ {
uint32_t decayDivider = 200.0 * m_settings.m_alphaEMA; int decayDivider = 200.0 * m_settings.m_alphaEMA;
int decayAmount = m_sinkSampleRate < decayDivider ? 1 : m_sinkSampleRate / decayDivider; int decayAmount = m_sinkSampleRate < decayDivider ? 1 : m_sinkSampleRate / decayDivider;
int trim = m_sinkSampleRate / 1000; int trim = m_sinkSampleRate / 1000;

View File

@ -98,7 +98,7 @@ private:
int m_channelSampleRate; int m_channelSampleRate;
int m_inputFrequencyOffset; int m_inputFrequencyOffset;
uint32_t m_sinkSampleRate; int m_sinkSampleRate;
SpectrumVis* m_spectrumSink; SpectrumVis* m_spectrumSink;
SampleVector m_sampleBuffer; SampleVector m_sampleBuffer;

View File

@ -44,12 +44,12 @@ signals:
private: private:
std::vector<RemoteDataBlock> m_data; std::vector<RemoteDataBlock> m_data;
int m_size; int m_size;
unsigned int m_readHead; //!< index of last data block processed int m_readHead; //!< index of last data block processed
unsigned int m_servedHead; //!< index of last data block served int m_servedHead; //!< index of last data block served
unsigned int m_writeHead; //!< index of next data block to serve int m_writeHead; //!< index of next data block to serve
QMutex m_mutex; QMutex m_mutex;
unsigned int calculateRemainder(); unsigned int calculateRemainder();
}; };
#endif // REMOTESINK_REMOTESINKFIFO_H_ #endif // REMOTESINK_REMOTESINKFIFO_H_

View File

@ -1088,7 +1088,7 @@ void ATVModSource::reportVideoFileSourceStreamTiming()
} }
} }
void ATVModSource::configureCameraIndex(int index) void ATVModSource::configureCameraIndex(unsigned int index)
{ {
if (index < m_cameras.size()) if (index < m_cameras.size())
{ {

View File

@ -68,7 +68,7 @@ public:
void openVideo(const QString& fileName); void openVideo(const QString& fileName);
void seekVideoFileStream(int seekPercentage); void seekVideoFileStream(int seekPercentage);
void reportVideoFileSourceStreamTiming(); void reportVideoFileSourceStreamTiming();
void configureCameraIndex(int index); void configureCameraIndex(unsigned int index);
void configureCameraData(uint32_t index, float mnaualFPS, bool manualFPSEnable); void configureCameraData(uint32_t index, float mnaualFPS, bool manualFPSEnable);
static void getBaseValues(int outputSampleRate, int linesPerSecond, int& sampleRateUnits, uint32_t& nbPointsPerRateUnit); static void getBaseValues(int outputSampleRate, int linesPerSecond, int& sampleRateUnits, uint32_t& nbPointsPerRateUnit);
@ -164,7 +164,7 @@ private:
int m_nbLines2; //!< same number as above (non interlaced) or Euclidean half the number above (interlaced) int m_nbLines2; //!< same number as above (non interlaced) or Euclidean half the number above (interlaced)
int m_nbLinesField1; //!< In interlaced mode: number of lines in field1 transition included int m_nbLinesField1; //!< In interlaced mode: number of lines in field1 transition included
uint32_t m_nbImageLines2; //!< half the number of effective image lines uint32_t m_nbImageLines2; //!< half the number of effective image lines
uint32_t m_nbImageLines; //!< number of effective image lines int m_nbImageLines; //!< number of effective image lines
uint32_t m_imageLineStart1; //!< start index of line for field 1 uint32_t m_imageLineStart1; //!< start index of line for field 1
uint32_t m_imageLineStart2; //!< start index of line for field 2 uint32_t m_imageLineStart2; //!< start index of line for field 2
int m_nbHorizPoints; //!< number of line points per horizontal line int m_nbHorizPoints; //!< number of line points per horizontal line

View File

@ -157,7 +157,7 @@ QByteArray ChirpChatModSettings::serialize() const
s.writeS32(7, m_deBits); s.writeS32(7, m_deBits);
s.writeBool(8, m_channelMute); s.writeBool(8, m_channelMute);
s.writeU32(9, m_syncWord); s.writeU32(9, m_syncWord);
s.writeS32(10, m_preambleChirps); s.writeU32(10, m_preambleChirps);
s.writeS32(11, m_quietMillis); s.writeS32(11, m_quietMillis);
s.writeBool(12, m_useReverseAPI); s.writeBool(12, m_useReverseAPI);
s.writeString(13, m_reverseAPIAddress); s.writeString(13, m_reverseAPIAddress);
@ -226,7 +226,7 @@ bool ChirpChatModSettings::deserialize(const QByteArray& data)
d.readBool(8, &m_channelMute, false); d.readBool(8, &m_channelMute, false);
d.readU32(9, &utmp, 0x34); d.readU32(9, &utmp, 0x34);
m_syncWord = utmp > 255 ? 0 : utmp; m_syncWord = utmp > 255 ? 0 : utmp;
d.readS32(10, &m_preambleChirps, 8); d.readU32(10, &m_preambleChirps, 8);
d.readS32(11, &m_quietMillis, 1000); d.readS32(11, &m_quietMillis, 1000);
d.readBool(11, &m_useReverseAPI, false); d.readBool(11, &m_useReverseAPI, false);
d.readString(12, &m_reverseAPIAddress, "127.0.0.1"); d.readString(12, &m_reverseAPIAddress, "127.0.0.1");

View File

@ -52,12 +52,12 @@ struct ChirpChatModSettings
int m_inputFrequencyOffset; int m_inputFrequencyOffset;
int m_bandwidthIndex; int m_bandwidthIndex;
int m_spreadFactor; int m_spreadFactor;
int m_deBits; //!< Low data rate optmize (DE) bits int m_deBits; //!< Low data rate optmize (DE) bits
int m_preambleChirps; //!< Number of preamble chirps unsigned int m_preambleChirps; //!< Number of preamble chirps
int m_quietMillis; //!< Number of milliseconds to pause between transmissions int m_quietMillis; //!< Number of milliseconds to pause between transmissions
int m_nbParityBits; //!< Hamming parity bits (LoRa) int m_nbParityBits; //!< Hamming parity bits (LoRa)
bool m_hasCRC; //!< Payload has CRC (LoRa) bool m_hasCRC; //!< Payload has CRC (LoRa)
bool m_hasHeader; //!< Header present before actual payload (LoRa) bool m_hasHeader; //!< Header present before actual payload (LoRa)
unsigned char m_syncWord; unsigned char m_syncWord;
bool m_channelMute; bool m_channelMute;
CodingScheme m_codingScheme; CodingScheme m_codingScheme;

View File

@ -62,7 +62,7 @@ void ChirpChatModSource::initSF(unsigned int sf)
m_phaseIncrements = new double[2*m_fftLength*ChirpChatModSettings::oversampling]; m_phaseIncrements = new double[2*m_fftLength*ChirpChatModSettings::oversampling];
phase = -halfAngle; phase = -halfAngle;
for (int i = 0; i < m_fftLength*ChirpChatModSettings::oversampling; i++) for (unsigned int i = 0; i < m_fftLength*ChirpChatModSettings::oversampling; i++)
{ {
m_phaseIncrements[i] = phase; m_phaseIncrements[i] = phase;
phase += (2*halfAngle) / (m_fftLength*ChirpChatModSettings::oversampling); phase += (2*halfAngle) / (m_fftLength*ChirpChatModSettings::oversampling);

View File

@ -78,7 +78,7 @@ bool RemoteSourceGUI::handleMessage(const Message& message)
{ {
const RemoteSource::MsgReportStreamData& report = (RemoteSource::MsgReportStreamData&) message; const RemoteSource::MsgReportStreamData& report = (RemoteSource::MsgReportStreamData&) message;
uint32_t remoteSampleRate = report.get_sampleRate(); int remoteSampleRate = report.get_sampleRate();
if (remoteSampleRate != m_remoteSampleRate) if (remoteSampleRate != m_remoteSampleRate)
{ {

View File

@ -263,8 +263,7 @@ void MetisMISOUDPHandler::dataReadyRead()
quint16 metisPort; quint16 metisPort;
unsigned char receiveBuffer[1032]; unsigned char receiveBuffer[1032];
qint64 length; qint64 length;
unsigned long sequence;
long sequence;
if ((length = m_socket.readDatagram((char*) &receiveBuffer, (qint64) sizeof(receiveBuffer), &metisAddress, &metisPort)) != 1032) if ((length = m_socket.readDatagram((char*) &receiveBuffer, (qint64) sizeof(receiveBuffer), &metisAddress, &metisPort)) != 1032)
{ {
@ -483,7 +482,7 @@ bool MetisMISOUDPHandler::getRxIQInversion(int index)
void MetisMISOUDPHandler::processIQBuffer(unsigned char* buffer) void MetisMISOUDPHandler::processIQBuffer(unsigned char* buffer)
{ {
int b = 0; int b = 0;
int r; unsigned int r;
int sampleI, sampleQ, sampleMic; int sampleI, sampleQ, sampleMic;

View File

@ -78,7 +78,7 @@ PluginInterface::SamplingDevices LimeSDROutputPlugin::enumSampleSinks(const Orig
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbTxStreams; j++) for (int j = 0; j < it->nbTxStreams; j++)
{ {
qDebug("LimeSDROutputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); qDebug("LimeSDROutputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial));
QString displayedName = it->displayableName; QString displayedName = it->displayableName;

View File

@ -44,12 +44,12 @@ signals:
private: private:
std::vector<RemoteDataBlock> m_data; std::vector<RemoteDataBlock> m_data;
int m_size; int m_size;
unsigned int m_readHead; //!< index of last data block processed int m_readHead; //!< index of last data block processed
unsigned int m_servedHead; //!< index of last data block served int m_servedHead; //!< index of last data block served
unsigned int m_writeHead; //!< index of next data block to serve int m_writeHead; //!< index of next data block to serve
QMutex m_mutex; QMutex m_mutex;
unsigned int calculateRemainder(); unsigned int calculateRemainder();
}; };
#endif // REMOTESINK_REMOTEOUTPUTFIFO_H_ #endif // REMOTESINK_REMOTEOUTPUTFIFO_H_

View File

@ -78,7 +78,7 @@ PluginInterface::SamplingDevices USRPOutputPlugin::enumSampleSinks(const OriginD
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbTxStreams; j++) for (int j = 0; j < it->nbTxStreams; j++)
{ {
qDebug("USRPOutputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); qDebug("USRPOutputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial));
QString displayedName = it->displayableName; QString displayedName = it->displayableName;

View File

@ -79,7 +79,7 @@ PluginInterface::SamplingDevices XTRXOutputPlugin::enumSampleSinks(const OriginD
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbTxStreams; j++) for (int j = 0; j < it->nbTxStreams; j++)
{ {
qDebug("XTRXInputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); qDebug("XTRXInputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial));
QString displayedName = it->displayableName; QString displayedName = it->displayableName;

View File

@ -83,7 +83,7 @@ PluginInterface::SamplingDevices AudioInputPlugin::enumSampleSources(const Origi
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbRxStreams; j++) for (int j = 0; j < it->nbRxStreams; j++)
{ {
result.append(SamplingDevice( result.append(SamplingDevice(
it->displayableName, it->displayableName,

View File

@ -78,7 +78,7 @@ PluginInterface::SamplingDevices LimeSDRInputPlugin::enumSampleSources(const Ori
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbRxStreams; j++) for (int j = 0; j < it->nbRxStreams; j++)
{ {
qDebug("LimeSDRInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); qDebug("LimeSDRInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial));
QString displayedName = it->displayableName; QString displayedName = it->displayableName;

View File

@ -78,7 +78,7 @@ PluginInterface::SamplingDevices USRPInputPlugin::enumSampleSources(const Origin
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbRxStreams; j++) for (int j = 0; j < it->nbRxStreams; j++)
{ {
qDebug("USRPInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); qDebug("USRPInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial));
QString displayedName = it->displayableName; QString displayedName = it->displayableName;

View File

@ -81,7 +81,7 @@ PluginInterface::SamplingDevices XTRXInputPlugin::enumSampleSources(const Origin
{ {
if (it->hardwareId == m_hardwareID) if (it->hardwareId == m_hardwareID)
{ {
for (unsigned int j = 0; j < it->nbRxStreams; j++) for (int j = 0; j < it->nbRxStreams; j++)
{ {
qDebug("XTRXInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); qDebug("XTRXInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial));
QString displayedName = it->displayableName; QString displayedName = it->displayableName;

View File

@ -35,7 +35,7 @@
#include "webapi/webapiadapterinterface.h" #include "webapi/webapiadapterinterface.h"
#include "webapi/webapiutils.h" #include "webapi/webapiutils.h"
bool ChannelWebAPIUtils::getCenterFrequency(int deviceIndex, double &frequencyInHz) bool ChannelWebAPIUtils::getCenterFrequency(unsigned int deviceIndex, double &frequencyInHz)
{ {
SWGSDRangel::SWGDeviceSettings deviceSettingsResponse; SWGSDRangel::SWGDeviceSettings deviceSettingsResponse;
SWGSDRangel::SWGErrorResponse errorResponse; SWGSDRangel::SWGErrorResponse errorResponse;
@ -44,7 +44,7 @@ bool ChannelWebAPIUtils::getCenterFrequency(int deviceIndex, double &frequencyIn
// Get current device settings // Get current device settings
std::vector<DeviceSet*> deviceSets = MainCore::instance()->getDeviceSets(); std::vector<DeviceSet*> deviceSets = MainCore::instance()->getDeviceSets();
if ((deviceIndex >= 0) && (deviceIndex < deviceSets.size())) if (deviceIndex < deviceSets.size())
{ {
deviceSet = deviceSets[deviceIndex]; deviceSet = deviceSets[deviceIndex];
if (deviceSet->m_deviceSourceEngine) if (deviceSet->m_deviceSourceEngine)
@ -91,7 +91,7 @@ bool ChannelWebAPIUtils::getCenterFrequency(int deviceIndex, double &frequencyIn
return WebAPIUtils::getSubObjectDouble(*jsonObj, "centerFrequency", frequencyInHz); return WebAPIUtils::getSubObjectDouble(*jsonObj, "centerFrequency", frequencyInHz);
} }
bool ChannelWebAPIUtils::setCenterFrequency(int deviceIndex, double frequencyInHz) bool ChannelWebAPIUtils::setCenterFrequency(unsigned int deviceIndex, double frequencyInHz)
{ {
SWGSDRangel::SWGDeviceSettings deviceSettingsResponse; SWGSDRangel::SWGDeviceSettings deviceSettingsResponse;
SWGSDRangel::SWGErrorResponse errorResponse; SWGSDRangel::SWGErrorResponse errorResponse;
@ -100,7 +100,7 @@ bool ChannelWebAPIUtils::setCenterFrequency(int deviceIndex, double frequencyInH
// Get current device settings // Get current device settings
std::vector<DeviceSet*> deviceSets = MainCore::instance()->getDeviceSets(); std::vector<DeviceSet*> deviceSets = MainCore::instance()->getDeviceSets();
if ((deviceIndex >= 0) && (deviceIndex < deviceSets.size())) if (deviceIndex < deviceSets.size())
{ {
deviceSet = deviceSets[deviceIndex]; deviceSet = deviceSets[deviceIndex];
if (deviceSet->m_deviceSourceEngine) if (deviceSet->m_deviceSourceEngine)

View File

@ -23,8 +23,8 @@
class SDRBASE_API ChannelWebAPIUtils class SDRBASE_API ChannelWebAPIUtils
{ {
public: public:
static bool getCenterFrequency(int deviceIndex, double &frequencyInHz); static bool getCenterFrequency(unsigned int deviceIndex, double &frequencyInHz);
static bool setCenterFrequency(int deviceIndex, double frequencyInHz); static bool setCenterFrequency(unsigned int deviceIndex, double frequencyInHz);
}; };
#endif // SDRBASE_CHANNEL_CHANNELWEBAPIUTILS_H_ #endif // SDRBASE_CHANNEL_CHANNELWEBAPIUTILS_H_

View File

@ -811,13 +811,13 @@ void DSPDeviceMIMOEngine::handleSetMIMO(DeviceSampleMIMO* mimo)
return; return;
} }
for (int i = 0; i < m_deviceSampleMIMO->getNbSinkFifos(); i++) for (unsigned int i = 0; i < m_deviceSampleMIMO->getNbSinkFifos(); i++)
{ {
m_basebandSampleSinks.push_back(BasebandSampleSinks()); m_basebandSampleSinks.push_back(BasebandSampleSinks());
m_sourcesCorrections.push_back(SourceCorrection()); m_sourcesCorrections.push_back(SourceCorrection());
} }
for (int i = 0; i < m_deviceSampleMIMO->getNbSourceFifos(); i++) for (unsigned int i = 0; i < m_deviceSampleMIMO->getNbSourceFifos(); i++)
{ {
m_basebandSampleSources.push_back(BasebandSampleSources()); m_basebandSampleSources.push_back(BasebandSampleSources());
m_sourceSampleBuffers.push_back(IncrementalVector<Sample>()); m_sourceSampleBuffers.push_back(IncrementalVector<Sample>());
@ -1018,7 +1018,7 @@ void DSPDeviceMIMOEngine::handleSynchronousMessages()
MIMOChannel *channel = msg->getChannel(); MIMOChannel *channel = msg->getChannel();
m_mimoChannels.push_back(channel); m_mimoChannels.push_back(channel);
for (int isource = 0; isource < m_deviceSampleMIMO->getNbSourceStreams(); isource++) for (unsigned int isource = 0; isource < m_deviceSampleMIMO->getNbSourceStreams(); isource++)
{ {
DSPMIMOSignalNotification notif( DSPMIMOSignalNotification notif(
m_deviceSampleMIMO->getSourceSampleRate(isource), m_deviceSampleMIMO->getSourceSampleRate(isource),
@ -1029,7 +1029,7 @@ void DSPDeviceMIMOEngine::handleSynchronousMessages()
channel->handleMessage(notif); channel->handleMessage(notif);
} }
for (int isink = 0; isink < m_deviceSampleMIMO->getNbSinkStreams(); isink++) for (unsigned int isink = 0; isink < m_deviceSampleMIMO->getNbSinkStreams(); isink++)
{ {
DSPMIMOSignalNotification notif( DSPMIMOSignalNotification notif(
m_deviceSampleMIMO->getSinkSampleRate(isink), m_deviceSampleMIMO->getSinkSampleRate(isink),

View File

@ -35,14 +35,14 @@ public:
Type filter(Type sample) Type filter(Type sample)
{ {
Type acc = 0; Type acc = 0;
int n_samples = m_samples.size(); unsigned int n_samples = m_samples.size();
int n_taps = m_taps.size() - 1; unsigned int n_taps = m_taps.size() - 1;
int a = m_ptr; unsigned int a = m_ptr;
int b = a == 0 ? n_samples - 1 : a - 1; unsigned int b = a == 0 ? n_samples - 1 : a - 1;
m_samples[m_ptr] = sample; m_samples[m_ptr] = sample;
for (int i = 0; i < n_taps; ++i) for (unsigned int i = 0; i < n_taps; ++i)
{ {
acc += (m_samples[a] + m_samples[b]) * m_taps[i]; acc += (m_samples[a] + m_samples[b]) * m_taps[i];

View File

@ -135,7 +135,7 @@ bool GLScopeSettings::deserialize(const QByteArray& data)
m_tracesData.clear(); m_tracesData.clear();
float r, g, b; float r, g, b;
for (int iTrace = 0; iTrace < nbTracesSaved; iTrace++) for (unsigned int iTrace = 0; iTrace < nbTracesSaved; iTrace++)
{ {
if (20 + 16*iTrace > 200) { if (20 + 16*iTrace > 200) {
break; break;
@ -171,7 +171,7 @@ bool GLScopeSettings::deserialize(const QByteArray& data)
d.readU32(200, &nbTriggersSaved, 1); d.readU32(200, &nbTriggersSaved, 1);
m_triggersData.clear(); m_triggersData.clear();
for (int iTrigger = 0; iTrigger < nbTriggersSaved; iTrigger++) for (unsigned int iTrigger = 0; iTrigger < nbTriggersSaved; iTrigger++)
{ {
m_triggersData.push_back(TriggerData()); m_triggersData.push_back(TriggerData());

View File

@ -60,7 +60,7 @@ QByteArray GLSpectrumSettings::serialize() const
{ {
SimpleSerializer s(1); SimpleSerializer s(1);
s.writeS32(1, m_fftSize); s.writeU32(1, m_fftSize);
s.writeS32(2, m_fftOverlap); s.writeS32(2, m_fftOverlap);
s.writeS32(3, (int) m_fftWindow); s.writeS32(3, (int) m_fftWindow);
s.writeReal(4, m_refLevel); s.writeReal(4, m_refLevel);
@ -102,7 +102,7 @@ bool GLSpectrumSettings::deserialize(const QByteArray& data)
if (d.getVersion() == 1) if (d.getVersion() == 1)
{ {
d.readS32(1, &m_fftSize, 1024); d.readU32(1, &m_fftSize, 1024);
d.readS32(2, &m_fftOverlap, 0); d.readS32(2, &m_fftOverlap, 0);
d.readS32(3, &tmp, (int) FFTWindow::Hanning); d.readS32(3, &tmp, (int) FFTWindow::Hanning);
m_fftWindow = (FFTWindow::Function) tmp; m_fftWindow = (FFTWindow::Function) tmp;

View File

@ -36,7 +36,7 @@ public:
AvgModeMax AvgModeMax
}; };
int m_fftSize; unsigned int m_fftSize;
int m_fftOverlap; int m_fftOverlap;
FFTWindow::Function m_fftWindow; FFTWindow::Function m_fftWindow;
Real m_refLevel; Real m_refLevel;

View File

@ -296,7 +296,7 @@ void SampleMIFifo::writeAsync(const SampleVector::const_iterator& begin, unsigne
} }
QMutexLocker mutexLocker(&m_mutex); QMutexLocker mutexLocker(&m_mutex);
int spaceLeft = m_size - m_vFill[stream]; unsigned int spaceLeft = m_size < m_vFill[stream] ? 0 : m_size - m_vFill[stream];
if (size > m_size) if (size > m_size)
{ {
@ -376,4 +376,4 @@ void SampleMIFifo::readAsync(
} }
m_vHead[stream] = m_vFill[stream]; m_vHead[stream] = m_vFill[stream];
} }

View File

@ -690,7 +690,7 @@ void SpectrumVis::applySettings(const GLSpectrumSettings& settings, bool force)
{ {
QMutexLocker mutexLocker(&m_mutex); QMutexLocker mutexLocker(&m_mutex);
int fftSize = settings.m_fftSize > MAX_FFT_SIZE ? unsigned int fftSize = settings.m_fftSize > MAX_FFT_SIZE ?
MAX_FFT_SIZE : MAX_FFT_SIZE :
settings.m_fftSize < 64 ? settings.m_fftSize < 64 ?
64 : 64 :

View File

@ -110,18 +110,18 @@ void MainCore::setLoggingOptions()
} }
} }
ChannelAPI *MainCore::getChannel(int deviceSetIndex, int channelIndex) ChannelAPI *MainCore::getChannel(unsigned int deviceSetIndex, int channelIndex)
{ {
if ((deviceSetIndex >= 0) && (deviceSetIndex < m_deviceSets.size())) { if (deviceSetIndex < m_deviceSets.size()) {
return m_deviceSets[deviceSetIndex]->getChannelAt(channelIndex); return m_deviceSets[deviceSetIndex]->getChannelAt(channelIndex);
} else { } else {
return nullptr; return nullptr;
} }
} }
Feature *MainCore::getFeature(int featureSetIndex, int featureIndex) Feature *MainCore::getFeature(unsigned int featureSetIndex, int featureIndex)
{ {
if ((featureSetIndex >= 0) && (featureSetIndex < m_featureSets.size())) { if (featureSetIndex < m_featureSets.size()) {
return m_featureSets[featureSetIndex]->getFeatureAt(featureIndex); return m_featureSets[featureSetIndex]->getFeatureAt(featureIndex);
} else { } else {
return nullptr; return nullptr;
@ -136,7 +136,7 @@ void MainCore::appendFeatureSet()
m_featureSetsMap.insert(featureSet, newIndex); m_featureSetsMap.insert(featureSet, newIndex);
} }
void MainCore::removeFeatureSet(int index) void MainCore::removeFeatureSet(unsigned int index)
{ {
if (index < m_featureSets.size()) if (index < m_featureSets.size())
{ {

View File

@ -413,13 +413,13 @@ public:
std::vector<DeviceSet*>& getDeviceSets() { return m_deviceSets; } std::vector<DeviceSet*>& getDeviceSets() { return m_deviceSets; }
std::vector<FeatureSet*>& getFeatureeSets() { return m_featureSets; } std::vector<FeatureSet*>& getFeatureeSets() { return m_featureSets; }
void setLoggingOptions(); void setLoggingOptions();
ChannelAPI *getChannel(int deviceSetIndex, int channelIndex); ChannelAPI *getChannel(unsigned int deviceSetIndex, int channelIndex);
Feature *getFeature(int featureSetIndex, int featureIndex); Feature *getFeature(unsigned int featureSetIndex, int featureIndex);
bool existsChannel(ChannelAPI *channel) const { return m_channelsMap.contains(channel); } bool existsChannel(ChannelAPI *channel) const { return m_channelsMap.contains(channel); }
bool existsFeature(Feature *feature) const { return m_featuresMap.contains(feature); } bool existsFeature(Feature *feature) const { return m_featuresMap.contains(feature); }
// slave mode // slave mode
void appendFeatureSet(); void appendFeatureSet();
void removeFeatureSet(int index); void removeFeatureSet(unsigned int index);
void removeLastFeatureSet(); void removeLastFeatureSet();
void appendDeviceSet(int deviceType); void appendDeviceSet(int deviceType);
void removeLastDeviceSet(); void removeLastDeviceSet();

View File

@ -134,9 +134,9 @@ void GLSpectrumGUI::displaySettings()
ui->fftWindow->setCurrentIndex(m_settings.m_fftWindow); ui->fftWindow->setCurrentIndex(m_settings.m_fftWindow);
for (int i = 0; i < 6; i++) for (unsigned int i = 0; i < 6; i++)
{ {
if (m_settings.m_fftSize == (1 << (i + 7))) if (m_settings.m_fftSize == (1U << (i + 7)))
{ {
ui->fftSize->setCurrentIndex(i); ui->fftSize->setCurrentIndex(i);
break; break;

View File

@ -651,9 +651,9 @@ void LimeRFEUSBDialog::syncRxTx()
void LimeRFEUSBDialog::stopStartRx(bool start) void LimeRFEUSBDialog::stopStartRx(bool start)
{ {
int rxDeviceSetSequence = ui->deviceSetRx->currentIndex(); unsigned int rxDeviceSetSequence = ui->deviceSetRx->currentIndex();
if ((rxDeviceSetSequence < 0) || (rxDeviceSetSequence >= m_sourceEngines.size())) { if (rxDeviceSetSequence >= m_sourceEngines.size()) {
return; return;
} }
@ -677,9 +677,9 @@ void LimeRFEUSBDialog::stopStartRx(bool start)
void LimeRFEUSBDialog::stopStartTx(bool start) void LimeRFEUSBDialog::stopStartTx(bool start)
{ {
int txDeviceSetSequence = ui->deviceSetTx->currentIndex(); unsigned int txDeviceSetSequence = ui->deviceSetTx->currentIndex();
if ((txDeviceSetSequence < 0) || (txDeviceSetSequence >= m_sinkEngines.size())) { if (txDeviceSetSequence >= m_sinkEngines.size()) {
return; return;
} }

View File

@ -638,7 +638,7 @@ void MainWindow::addFeatureSet()
ui->tabFeatures->addTab(m_featureUIs.back()->m_featureWindow, QString("F%1").arg(tabIndex)); ui->tabFeatures->addTab(m_featureUIs.back()->m_featureWindow, QString("F%1").arg(tabIndex));
} }
void MainWindow::removeFeatureSet(int tabIndex) void MainWindow::removeFeatureSet(unsigned int tabIndex)
{ {
if (tabIndex < m_featureUIs.size()) if (tabIndex < m_featureUIs.size())
{ {

View File

@ -138,7 +138,7 @@ private:
void addMIMODevice(); void addMIMODevice();
void removeLastDevice(); void removeLastDevice();
void addFeatureSet(); void addFeatureSet();
void removeFeatureSet(int tabIndex); void removeFeatureSet(unsigned int tabIndex);
void removeAllFeatureSets(); void removeAllFeatureSets();
void deleteChannel(int deviceSetIndex, int channelIndex); void deleteChannel(int deviceSetIndex, int channelIndex);
void sampleSourceChanged(int tabIndex, int newDeviceIndex); void sampleSourceChanged(int tabIndex, int newDeviceIndex);