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