Browse Source

Fix warnings

chirpmodem-v8.1.0
Jon Beniston 4 weeks ago
parent
commit
fb3058dea3
  1. BIN
      doc/img/AircraftFeature_atc_labels.png
  2. 4
      plugins/channelrx/demodacars/acarsdemodgui.cpp
  3. 6
      plugins/channelrx/demodacars/acarsdemodsink.cpp
  4. 7
      plugins/channelrx/demodacars/acarsdemodworker.cpp
  5. 22
      plugins/channelrx/demodacars/acarsmessagemodel.cpp
  6. 7
      plugins/channelrx/demodacars/acarsmessagemodel.h
  7. 2
      plugins/channelrx/demodacars/atn/asn1/OBJECT_IDENTIFIER.c
  8. 2
      plugins/channelrx/demodacars/atn/asn1/RELATIVE-OID.c
  9. 1
      plugins/channelrx/demodacars/atn/asn1/constr_SEQUENCE.c
  10. 2
      plugins/channelrx/demodacars/atn/asn1/per_support.c
  11. 11
      plugins/channelrx/demodacars/atn/dumpvdl2shim.c
  12. 2
      plugins/channelrx/demodacars/readme.md
  13. 4
      plugins/channelrx/demodadsb/adsbaircraft.h
  14. 6
      plugins/channelrx/demodadsb/adsbdemodgui.cpp
  15. 12
      plugins/channelrx/demodadsb/adsbdemodtracker.cpp
  16. 6
      plugins/channelrx/demodadsb/adsbdemodtrackerdecode.cpp
  17. 12
      plugins/feature/aircraft/readme.md
  18. 16964
      plugins/feature/map/Cesium/Cesium.js
  19. 16960
      plugins/feature/map/Cesium/index.cjs
  20. 16962
      plugins/feature/map/Cesium/index.js
  21. 4
      sdrbase/util/acarsmessage.cpp
  22. 4
      sdrbase/util/acarsmessage.h
  23. 3
      sdrbase/util/ais.cpp
  24. 11
      sdrbase/util/bglwaypointreader.cpp
  25. 4
      sdrbase/util/do219.h
  26. 3
      sdrbase/util/radiosonde.cpp

BIN
doc/img/AircraftFeature_atc_labels.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

4
plugins/channelrx/demodacars/acarsdemodgui.cpp

@ -870,10 +870,10 @@ AcarsDemodGUI::AcarsDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas @@ -870,10 +870,10 @@ AcarsDemodGUI::AcarsDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
ui(new Ui::AcarsDemodGUI),
m_pluginAPI(pluginAPI),
m_deviceUISet(deviceUISet),
m_deviceCenterFrequency(0),
m_basebandSampleRate(1),
m_channelMarker(this),
m_doApplySettings(true),
m_deviceCenterFrequency(0),
m_basebandSampleRate(1),
m_tickCount(0),
m_progressDialog(nullptr),
m_tableTimer(nullptr),

6
plugins/channelrx/demodacars/acarsdemodsink.cpp

@ -43,13 +43,13 @@ AcarsDemodSink::AcarsDemodSink(AcarsDemod *acarsDemod) : @@ -43,13 +43,13 @@ AcarsDemodSink::AcarsDemodSink(AcarsDemod *acarsDemod) :
m_magsqPeak(0.0f),
m_magsqCount(0),
m_messageQueueToChannel(nullptr),
m_scopeBufferIndex(0),
m_demodBufferFill(0),
m_iridiumChannels(0), // Configured on the first Iridium sample
m_iridiumLogCount(0),
m_iridiumCarrierCount(0),
m_demodPipesPresent(false),
m_demodPipeCheck(1)
m_demodPipeCheck(1),
m_scopeBufferIndex(0),
m_demodBufferFill(0)
{
m_demodBuffer.resize(1<<12);
m_scopeBuffer.resize(m_scopeBufferSize);

7
plugins/channelrx/demodacars/acarsdemodworker.cpp

@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
#include <QDebug>
#include <QCoreApplication>
#include <QJsonObject>
#include <QTimeZone>
#include <QJsonDocument>
#include <QHostInfo>
@ -485,7 +486,7 @@ static QDateTime oooiDateTime(const QDateTime& received, int day, const QTime& t @@ -485,7 +486,7 @@ static QDateTime oooiDateTime(const QDateTime& received, int day, const QTime& t
}
const QDate base = received.toUTC().date();
if ((day < 1) || (day > 31)) {
return QDateTime(base, time, Qt::UTC);
return QDateTime(base, time, QTimeZone::utc());
}
for (int offset = 0; offset <= 2; offset++)
{
@ -493,14 +494,14 @@ static QDateTime oooiDateTime(const QDateTime& received, int day, const QTime& t @@ -493,14 +494,14 @@ static QDateTime oooiDateTime(const QDateTime& received, int day, const QTime& t
{
const QDate d = base.addDays(sign * offset);
if (d.day() == day) {
return QDateTime(d, time, Qt::UTC);
return QDateTime(d, time, QTimeZone::utc());
}
if (offset == 0) {
break;
}
}
}
return QDateTime(base, time, Qt::UTC);
return QDateTime(base, time, QTimeZone::utc());
}
// Recognise a weather report inside an ACARS message, and say which airport it is about.

22
plugins/channelrx/demodacars/acarsmessagemodel.cpp

@ -258,6 +258,22 @@ void AcarsMessageModel::setShowDate(bool showDate) @@ -258,6 +258,22 @@ void AcarsMessageModel::setShowDate(bool showDate)
// beginFilterChange() was added in Qt 6.9 and endFilterChange() in Qt 6.10, and
// invalidateFilter() is deprecated in favour of the pair. Bracketing the change is
// what newer Qt wants - beginFilterChange() before the filter state is touched - so
// the call sites are written that way and these stand in on older Qt, where a single
// invalidateFilter() after the change is the whole operation.
#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0)
void AcarsMessageFilter::beginFilterChange()
{
}
void AcarsMessageFilter::endFilterChange()
{
invalidateFilter();
}
#endif
AcarsMessageFilter::AcarsMessageFilter(QObject *parent) :
QSortFilterProxyModel(parent),
m_hideNoInfo(true),
@ -271,19 +287,21 @@ void AcarsMessageFilter::setHideNoInfo(bool hide) @@ -271,19 +287,21 @@ void AcarsMessageFilter::setHideNoInfo(bool hide)
if (hide == m_hideNoInfo) {
return;
}
beginFilterChange();
m_hideNoInfo = hide;
invalidateFilter();
endFilterChange();
}
void AcarsMessageFilter::setFilter(int column, const QString& pattern)
{
beginFilterChange();
m_filterColumn = column;
// Anchored, as the table's filter has always been - the pattern has to match the
// whole cell rather than appear somewhere in it
m_filterRe = QRegularExpression(QRegularExpression::anchoredPattern(pattern));
m_filterValid = !pattern.isEmpty() && m_filterRe.isValid()
&& (column >= 0) && (column < MESSAGE_COL_COUNT);
invalidateFilter();
endFilterChange();
}
// The base class would map a vertical section back to its source row, which with a

7
plugins/channelrx/demodacars/acarsmessagemodel.h

@ -139,6 +139,13 @@ protected: @@ -139,6 +139,13 @@ protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override;
bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
// Qt 6.10 brought these, deprecating invalidateFilter() in their favour. On
// anything older they stand in for it - see acarsmessagemodel.cpp
#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0)
void beginFilterChange();
void endFilterChange();
#endif
private:
bool m_hideNoInfo;
int m_filterColumn;

2
plugins/channelrx/demodacars/atn/asn1/OBJECT_IDENTIFIER.c

@ -278,6 +278,8 @@ OBJECT_IDENTIFIER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const @@ -278,6 +278,8 @@ OBJECT_IDENTIFIER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const
int ret;
(void)td;
/* Only read by the assert below, which NDEBUG compiles away */
(void)chunk_end;
arcs_count = OBJECT_IDENTIFIER_parse_arcs(
(const char *)chunk_buf, chunk_size, arcs,

2
plugins/channelrx/demodacars/atn/asn1/RELATIVE-OID.c

@ -101,6 +101,8 @@ RELATIVE_OID__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void @@ -101,6 +101,8 @@ RELATIVE_OID__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void
int ret;
(void)td;
/* Only read by the assert below, which NDEBUG compiles away */
(void)chunk_end;
arcs_count = OBJECT_IDENTIFIER_parse_arcs(
(const char *)chunk_buf, chunk_size,

1
plugins/channelrx/demodacars/atn/asn1/constr_SEQUENCE.c

@ -437,6 +437,7 @@ SEQUENCE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, @@ -437,6 +437,7 @@ SEQUENCE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
phase3:
ctx->phase = 3;
/* Fall through */
case 3: /* 00 and other tags expected */
case 4: /* only 00's expected */

2
plugins/channelrx/demodacars/atn/asn1/per_support.c

@ -302,6 +302,8 @@ int uper_put_constrained_whole_number_s(asn_per_outp_t *po, long v, int nbits) { @@ -302,6 +302,8 @@ int uper_put_constrained_whole_number_s(asn_per_outp_t *po, long v, int nbits) {
long svalue = uvalue1;
unsigned long uvalue2 = svalue;
assert(uvalue1 == uvalue2);
/* Only read by the assert above, which NDEBUG compiles away */
(void)uvalue2;
return uper_put_constrained_whole_number_u(po, v, nbits);
}

11
plugins/channelrx/demodacars/atn/dumpvdl2shim.c

@ -160,11 +160,14 @@ static void unknown_proto_format_text(la_vstring *vstr, void const *data, int in @@ -160,11 +160,14 @@ static void unknown_proto_format_text(la_vstring *vstr, void const *data, int in
EOL(vstr);
}
// Designated, as the descriptors in icao.c and xid.c are: la_type_descriptor ends
// in eight reserved function pointers, and positional initialisers leave those
// unmentioned, which -Wmissing-field-initializers reports
static la_type_descriptor const proto_DEF_unknown = {
unknown_proto_format_text, // format_text
NULL, // destroy
NULL, // format_json
"unknown_proto" // json_key
.format_text = unknown_proto_format_text,
.destroy = NULL,
.format_json = NULL,
.json_key = "unknown_proto"
};
la_proto_node *unknown_proto_pdu_new(void *buf, size_t len)

2
plugins/channelrx/demodacars/readme.md

@ -59,6 +59,8 @@ the combo box next to the Mode selector: @@ -59,6 +59,8 @@ the combo box next to the Mode selector:
| 4 MHz | 128 | 4 MS/s | about half the band |
| 8 MHz | 256 | 8 MS/s | all of it, tuned to 1623 MHz |
Received messages are forwarded to the [Aircraft feature](../../feature/aircraft/readme.md) for display on the [Map feature](../../feature/map/readme.md).
<h2>Interface</h2>
![ACARS Demodulator plugin GUI](../../../doc/img/AcarsDemod_plugin.png)

4
plugins/channelrx/demodadsb/adsbaircraft.h

@ -296,7 +296,6 @@ struct ADSBAircraft { @@ -296,7 +296,6 @@ struct ADSBAircraft {
m_minCorrelation(INFINITY),
m_maxCorrelation(-INFINITY),
m_correlation(0.0f),
m_tcasAlert(false),
m_aircraftInfo(nullptr),
m_modelAltitudeOffset(0.0f),
m_labelAltitudeOffset(5.0f),
@ -317,7 +316,8 @@ struct ADSBAircraft { @@ -317,7 +316,8 @@ struct ADSBAircraft {
m_isNew(true),
m_positionChanged(false),
m_trailCleared(false),
m_mapTrailResetPending(false)
m_mapTrailResetPending(false),
m_tcasAlert(false)
{
for (int i = 0; i < 2; i++) {
m_cprValid[i] = false;

6
plugins/channelrx/demodadsb/adsbdemodgui.cpp

@ -2445,10 +2445,11 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb @@ -2445,10 +2445,11 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_basicSettingsShown(false),
m_doApplySettings(true),
m_tickCount(0),
m_trackAircraft(nullptr),
m_aircraftInfo(nullptr),
m_loadingData(false),
m_airportModel(this),
m_airspaceModel(this),
m_trackAircraft(nullptr),
m_highlightAircraft(nullptr),
m_chart(nullptr),
m_adsbFrameRateSeries(nullptr),
@ -2459,8 +2460,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb @@ -2459,8 +2460,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_aircraftYAxis(nullptr),
m_speech(nullptr),
m_progressDialog(nullptr),
m_networkManager(nullptr),
m_loadingData(false)
m_networkManager(nullptr)
{
setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channelrx/demodadsb/readme.md";

12
plugins/channelrx/demodadsb/adsbdemodtracker.cpp

@ -40,11 +40,6 @@ ADSBDemodTracker::ADSBDemodTracker(ADSBDemod *adsbDemod) : @@ -40,11 +40,6 @@ ADSBDemodTracker::ADSBDemodTracker(ADSBDemod *adsbDemod) :
m_basebandSampleRate(0),
m_flushTimer(nullptr),
m_tickTimer(nullptr),
m_importNetworkManager(nullptr),
m_importTimer(nullptr),
m_flightInformation(nullptr),
m_importRequestGeneration(0),
m_importAuthenticationRetry(false),
m_statsChanged(false),
m_trackAircraft(nullptr),
m_qnhReported(0),
@ -56,7 +51,12 @@ ADSBDemodTracker::ADSBDemodTracker(ADSBDemod *adsbDemod) : @@ -56,7 +51,12 @@ ADSBDemodTracker::ADSBDemodTracker(ADSBDemod *adsbDemod) :
m_maxRangeStat(0.0f),
m_maxAltitudeStat(0.0f),
m_maxRateState(0.0f),
m_loadingData(false)
m_loadingData(false),
m_importNetworkManager(nullptr),
m_importTimer(nullptr),
m_importRequestGeneration(0),
m_importAuthenticationRetry(false),
m_flightInformation(nullptr)
{
qRegisterMetaType<ADSBAircraftUpdate>("ADSBAircraftUpdate");
qRegisterMetaType<QList<ADSBAircraftUpdate>>("QList<ADSBAircraftUpdate>");

6
plugins/channelrx/demodadsb/adsbdemodtrackerdecode.cpp

@ -864,7 +864,6 @@ void ADSBDemodTracker::atcCallsign(ADSBAircraft *aircraft) @@ -864,7 +864,6 @@ void ADSBDemodTracker::atcCallsign(ADSBAircraft *aircraft)
if (!aircraft->m_aircraftInfo)
{
// Airline logo
QIcon *icon = nullptr;
const QString airlinePath = AircraftInformation::getAirlineIconPath(airline->m_icao);
if (!airlinePath.isEmpty())
{
@ -4914,7 +4913,10 @@ void ADSBDemodTracker::sendAircraftReport() @@ -4914,7 +4913,10 @@ void ADSBDemodTracker::sendAircraftReport()
aircraft->m_latitude,
aircraft->m_longitude,
aircraft->m_altitude,
aircraft->m_groundspeed
aircraft->m_groundspeed,
aircraft->m_positionValid,
aircraft->m_altitudeValid,
aircraft->m_groundspeedValid
};
report.append(aircraftReport);

12
plugins/feature/aircraft/readme.md

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
The Aircraft feature collates aircraft data from multiple demodulators into a single
aircraft list, and sends the combined aircraft to the [Map feature](../map/readme.md).
Sightings are received from the [ADS-B demodulator](../../channelrx/demodadsb/readme.md),
Reports are received from the [ADS-B demodulator](../../channelrx/demodadsb/readme.md),
the [ACARS demodulator](../../channelrx/demodacars/readme.md) (VHF ACARS, VDL Mode 2
HFDL, Aero and Iridium modes) and the [SELCAL demodulator](../../channelrx/demodselcal/readme.md),
from any number of channels in any device set.
@ -69,7 +69,7 @@ without a report. @@ -69,7 +69,7 @@ without a report.
<h3>1: Find column</h3>
Which field the Find box (2) looks in - All, ICAO, Reg, Type or Flight.
Which field the Find box (2) looks in - All, ICAO, Reg, Type, Callsign or SELCAL.
<h3>2: Find</h3>
@ -93,10 +93,14 @@ a rule, the rule's speech text is read aloud and/or its command is executed, wit @@ -93,10 +93,14 @@ a rule, the rule's speech text is read aloud and/or its command is executed, wit
${icao} ${reg} ${flight} ${type} ${protocol} substituted. Each rule fires at most once
per aircraft.
![Notifications dialog](../../../doc/img/ADSBDemod_plugin_notifications.png)
<h3>5: ATC</h3>
When checked, aircraft labels on the Map show route, flight level, speed and type in
an ATC style; when unchecked just the flight number or registration is shown.
When checked, aircraft labels on the Map show callsign, flight level, speed and type in
an ATC style; when unchecked just the callsign or registration is shown.
![ATC Labels](../../../doc/img/AircraftFeature_atc_labels.png)
<h3>6: Statistics</h3>

16964
plugins/feature/map/Cesium/Cesium.js

File diff suppressed because one or more lines are too long

16960
plugins/feature/map/Cesium/index.cjs

File diff suppressed because one or more lines are too long

16962
plugins/feature/map/Cesium/index.js

File diff suppressed because one or more lines are too long

4
sdrbase/util/acarsmessage.cpp

@ -240,7 +240,7 @@ AcarsMessage *AcarsMessage::decodeBlock(const QByteArray &message, const QString @@ -240,7 +240,7 @@ AcarsMessage *AcarsMessage::decodeBlock(const QByteArray &message, const QString
text = ascii.mid(start, textSize);
}
return decode(ascii, label, textOverride ? *textOverride : text, uplink);
return decode(ascii, label, textOverride ? *textOverride : text);
}
else
{
@ -388,7 +388,7 @@ QString AcarsLoadsheet::toString() @@ -388,7 +388,7 @@ QString AcarsLoadsheet::toString()
return lines.join("<br>");
}
AcarsMessage *AcarsMessage::decode(const QByteArray &message, const QString &label, const QString &text, bool uplink)
AcarsMessage *AcarsMessage::decode(const QByteArray &message, const QString &label, const QString &text)
{
AcarsMessage *acarsMessage;
// Before the label dispatch: a loadsheet arrives under whatever label the airline

4
sdrbase/util/acarsmessage.h

@ -97,7 +97,9 @@ public: @@ -97,7 +97,9 @@ public:
static AcarsMessage *decode(const QByteArray &message, const QString &text);
protected:
static AcarsMessage *decodeBlock(const QByteArray &message, const QString *text);
static AcarsMessage *decode(const QByteArray &message, const QString &label, const QString &text, bool uplink);
// The direction is not passed: each AcarsMessage reads the block identifier in
// parse() and sets m_uplink itself
static AcarsMessage *decode(const QByteArray &message, const QString &label, const QString &text);
static bool isUplink(QChar blockId);
};

3
sdrbase/util/ais.cpp

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QDebug>
#include <QTimeZone>
#include <cmath>
@ -450,7 +451,7 @@ AISBaseStationReport::AISBaseStationReport(QByteArray ba) : @@ -450,7 +451,7 @@ AISBaseStationReport::AISBaseStationReport(QByteArray ba) :
int hour = ((ba[7] & 0x7) << 2) | ((ba[8] >> 6) & 0x3);
int minute = ba[8] & 0x3f;
int second = (ba[9] >> 2) & 0x3f;
m_utc = QDateTime(QDate(year, month, day), QTime(hour, minute, second), Qt::UTC);
m_utc = QDateTime(QDate(year, month, day), QTime(hour, minute, second), QTimeZone::utc());
m_positionAccuracy = (ba[9] >> 1) & 0x1;

11
sdrbase/util/bglwaypointreader.cpp

@ -160,6 +160,11 @@ QList<QFileInfo> sourceFiles(const QFileInfo& source) @@ -160,6 +160,11 @@ QList<QFileInfo> sourceFiles(const QFileInfo& source)
QByteArray sourceFingerprint(const QList<QFileInfo>& files, const QString& rootPath)
{
QCryptographicHash hash(QCryptographicHash::Sha256);
// A field separator, so a name ending in digits cannot run into the size
// that follows it. addData(const char *, qsizetype) is deprecated in Qt 6.3;
// the QByteArray overload is present in both Qt 5 and Qt 6, and the other
// calls in this loop already use it
static const QByteArray separator(1, '\0');
for (const QFileInfo& file : files)
{
@ -168,11 +173,11 @@ QByteArray sourceFingerprint(const QList<QFileInfo>& files, const QString& rootP @@ -168,11 +173,11 @@ QByteArray sourceFingerprint(const QList<QFileInfo>& files, const QString& rootP
filename = filename.mid(rootPath.size());
}
hash.addData(filename.toUtf8());
hash.addData("\0", 1);
hash.addData(separator);
hash.addData(QByteArray::number(file.size()));
hash.addData("\0", 1);
hash.addData(separator);
hash.addData(QByteArray::number(file.lastModified().toMSecsSinceEpoch()));
hash.addData("\0", 1);
hash.addData(separator);
}
return hash.result().toHex();

4
sdrbase/util/do219.h

@ -1338,8 +1338,8 @@ protected: @@ -1338,8 +1338,8 @@ protected:
QString decodeTp4Table()
{
int t = getBits(1);
return ""; // Nothing to display
getBits(1); // Consumed to keep the bit position right; nothing to display
return "";
}
QString decodeTrackDetailMsg()

3
sdrbase/util/radiosonde.cpp

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QDateTime>
#include <QTimeZone>
#include <QVector3D>
#include "util/radiosonde.h"
@ -223,7 +224,7 @@ void RS41Frame::decodePosDateTime(const QByteArray ba) @@ -223,7 +224,7 @@ void RS41Frame::decodePosDateTime(const QByteArray ba)
if ((ba[0x19] & 0xff) < 100) {
msec = (ba[0x19] & 0xff) * 10;
}
m_gpsDateTime = QDateTime(QDate(year, month, day), QTime(hour, minute, second, msec), Qt::UTC);
m_gpsDateTime = QDateTime(QDate(year, month, day), QTime(hour, minute, second, msec), QTimeZone::utc());
}
}

Loading…
Cancel
Save