mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Fix GCC compiler warnings
This commit is contained in:
parent
5fdcdcc706
commit
55db78bdaf
@ -246,7 +246,6 @@ struct NavAid {
|
||||
size_t nameLen = 0;
|
||||
char *frequencyString = NULL;
|
||||
int frequency;
|
||||
size_t frequencyLen = 0;
|
||||
float latitude = 0.0f;
|
||||
char *latitudeString = NULL;
|
||||
size_t latitudeLen = 0;
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
virtual ~VORDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -581,16 +581,17 @@ void VORDemodGUI::resizeTable()
|
||||
{
|
||||
// Fill table with a row of dummy data that will size the columns nicely
|
||||
// Trailing spaces are for sort arrow
|
||||
QString morse("---- ---- ----");
|
||||
int row = ui->vorData->rowCount();
|
||||
ui->vorData->setRowCount(row + 1);
|
||||
ui->vorData->setItem(row, VOR_COL_NAME, new QTableWidgetItem("White Sulphur Springs"));
|
||||
ui->vorData->setItem(row, VOR_COL_FREQUENCY, new QTableWidgetItem("Freq (MHz) "));
|
||||
ui->vorData->setItem(row, VOR_COL_OFFSET, new QTableWidgetItem("Offset (kHz) "));
|
||||
ui->vorData->setItem(row, VOR_COL_IDENT, new QTableWidgetItem("Ident "));
|
||||
ui->vorData->setItem(row, VOR_COL_MORSE, new QTableWidgetItem(Morse::toSpacedUnicode(QString("---- ---- ----"))));
|
||||
ui->vorData->setItem(row, VOR_COL_RADIAL, new QTableWidgetItem("Radial (°) "));
|
||||
ui->vorData->setItem(row, VOR_COL_MORSE, new QTableWidgetItem(Morse::toSpacedUnicode(morse)));
|
||||
ui->vorData->setItem(row, VOR_COL_RADIAL, new QTableWidgetItem("Radial (o) "));
|
||||
ui->vorData->setItem(row, VOR_COL_RX_IDENT, new QTableWidgetItem("RX Ident "));
|
||||
ui->vorData->setItem(row, VOR_COL_RX_MORSE, new QTableWidgetItem(Morse::toSpacedUnicode(QString("---- ---- ----"))));
|
||||
ui->vorData->setItem(row, VOR_COL_RX_MORSE, new QTableWidgetItem(Morse::toSpacedUnicode(morse)));
|
||||
ui->vorData->setItem(row, VOR_COL_VAR_MAG, new QTableWidgetItem("Var (dB) "));
|
||||
ui->vorData->setItem(row, VOR_COL_REF_MAG, new QTableWidgetItem("Ref (dB) "));
|
||||
ui->vorData->setItem(row, VOR_COL_MUTE, new QTableWidgetItem("Mute"));
|
||||
@ -601,12 +602,16 @@ void VORDemodGUI::resizeTable()
|
||||
// Columns in table reordered
|
||||
void VORDemodGUI::vorData_sectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex)
|
||||
{
|
||||
(void) oldVisualIndex;
|
||||
|
||||
m_settings.m_columnIndexes[logicalIndex] = newVisualIndex;
|
||||
}
|
||||
|
||||
// Column in table resized (when hidden size is 0)
|
||||
void VORDemodGUI::vorData_sectionResized(int logicalIndex, int oldSize, int newSize)
|
||||
{
|
||||
(void) oldSize;
|
||||
|
||||
m_settings.m_columnSizes[logicalIndex] = newSize;
|
||||
}
|
||||
|
||||
@ -619,6 +624,8 @@ void VORDemodGUI::columnSelectMenu(QPoint pos)
|
||||
// Hide/show column when menu selected
|
||||
void VORDemodGUI::columnSelectMenuChecked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
|
||||
QAction* action = qobject_cast<QAction*>(sender());
|
||||
if (action != nullptr)
|
||||
{
|
||||
@ -999,7 +1006,7 @@ void VORDemodGUI::downloadFinished(const QString& filename, bool success)
|
||||
QUrl dbURL(urlString);
|
||||
m_progressDialog->setLabelText(QString("Downloading %1.").arg(urlString));
|
||||
m_progressDialog->setValue(m_countryIndex);
|
||||
QNetworkReply *reply = m_dlm.download(dbURL, vorDBFile);
|
||||
m_dlm.download(dbURL, vorDBFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1028,6 +1035,8 @@ void VORDemodGUI::downloadFinished(const QString& filename, bool success)
|
||||
|
||||
void VORDemodGUI::on_getOurAirportsVORDB_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
|
||||
// Don't try to download while already in progress
|
||||
if (m_progressDialog == nullptr)
|
||||
{
|
||||
@ -1049,6 +1058,8 @@ void VORDemodGUI::on_getOurAirportsVORDB_clicked(bool checked)
|
||||
|
||||
void VORDemodGUI::on_getOpenAIPVORDB_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
|
||||
// Don't try to download while already in progress
|
||||
if (m_progressDialog == nullptr)
|
||||
{
|
||||
@ -1066,7 +1077,7 @@ void VORDemodGUI::on_getOpenAIPVORDB_clicked(bool checked)
|
||||
m_progressDialog->setMaximum(sizeof(countryCodes)/sizeof(countryCodes[0]));
|
||||
m_progressDialog->setValue(0);
|
||||
m_progressDialog->setLabelText(QString("Downloading %1.").arg(urlString));
|
||||
QNetworkReply *reply = m_dlm.download(dbURL, vorDBFile);
|
||||
m_dlm.download(dbURL, vorDBFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1393,7 +1404,6 @@ void VORDemodGUI::tick()
|
||||
{
|
||||
// Move antenna icon to estimated position
|
||||
QQuickItem *item = ui->map->rootObject();
|
||||
QObject *object = item->findChild<QObject*>("map");
|
||||
QObject *stationObject = item->findChild<QObject*>("station");
|
||||
if(stationObject != NULL)
|
||||
{
|
||||
|
@ -117,6 +117,7 @@ public:
|
||||
bool setData(const QModelIndex &index, const QVariant& value, int role = Qt::EditRole) override;
|
||||
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override {
|
||||
(void) index;
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,8 @@ ChannelGUI* VORDemodPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
BasebandSampleSink *rxChannel) const
|
||||
{
|
||||
(void) deviceUISet;
|
||||
(void) rxChannel;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
@ -32,25 +32,25 @@
|
||||
|
||||
VORDemodSink::VORDemodSink(const VORDemodSettings& settings, int subChannel,
|
||||
MessageQueue *messageQueueToGUI) :
|
||||
m_channelFrequencyOffset(0),
|
||||
m_outOfBand(true),
|
||||
m_channelSampleRate(VORDEMOD_CHANNEL_SAMPLE_RATE),
|
||||
m_audioSampleRate(48000),
|
||||
m_channelFrequencyOffset(0),
|
||||
m_squelchCount(0),
|
||||
m_squelchOpen(false),
|
||||
m_squelchDelayLine(9600),
|
||||
m_magsqSum(0.0f),
|
||||
m_magsqPeak(0.0f),
|
||||
m_magsqCount(0),
|
||||
m_messageQueueToGUI(messageQueueToGUI),
|
||||
m_volumeAGC(0.003),
|
||||
m_audioFifo(48000),
|
||||
m_movingAverageIdent(5000),
|
||||
m_bitTime(0),
|
||||
m_prevBit(0),
|
||||
m_varGoertzel(30, VORDEMOD_CHANNEL_SAMPLE_RATE),
|
||||
m_refGoertzel(30, VORDEMOD_CHANNEL_SAMPLE_RATE),
|
||||
m_refPrev(0.0f),
|
||||
m_outOfBand(true),
|
||||
m_messageQueueToGUI(messageQueueToGUI)
|
||||
m_movingAverageIdent(5000),
|
||||
m_prevBit(0),
|
||||
m_bitTime(0),
|
||||
m_varGoertzel(30, VORDEMOD_CHANNEL_SAMPLE_RATE),
|
||||
m_refGoertzel(30, VORDEMOD_CHANNEL_SAMPLE_RATE)
|
||||
{
|
||||
m_audioBuffer.resize(1<<14);
|
||||
m_audioBufferFill = 0;
|
||||
@ -139,14 +139,14 @@ void VORDemodSink::processOneAudioSample(Complex &ci)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_squelchCount < m_audioSampleRate / 10) {
|
||||
if (m_squelchCount < (unsigned int)m_audioSampleRate / 10) {
|
||||
m_squelchCount++;
|
||||
}
|
||||
}
|
||||
|
||||
qint16 sample;
|
||||
|
||||
m_squelchOpen = (m_squelchCount >= m_audioSampleRate / 20);
|
||||
m_squelchOpen = (m_squelchCount >= (unsigned int)m_audioSampleRate / 20);
|
||||
|
||||
if (m_squelchOpen && !m_settings.m_audioMute && !m_settings.m_subChannelSettings.value(m_subChannelId)->m_audioMute)
|
||||
{
|
||||
@ -313,7 +313,7 @@ void VORDemodSink::processOneSample(Complex &ci)
|
||||
{
|
||||
if (m_ident != "")
|
||||
{
|
||||
qDebug() << m_ident << " " << Morse::toString(m_ident.simplified());
|
||||
qDebug() << m_ident << " " << Morse::toString(m_ident);
|
||||
if (getMessageQueueToGUI())
|
||||
{
|
||||
VORDemodReport::MsgReportIdent *msg = VORDemodReport::MsgReportIdent::create(m_subChannelId, m_ident);
|
||||
|
Loading…
Reference in New Issue
Block a user