From de7192b6b4e365f5a30afd2d3a8d1b56ccd2ae81 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 3 Mar 2023 22:51:14 +0000 Subject: [PATCH 1/2] Update DAB Demod to use latest DAB API, that fixes #1608 --- plugins/channelrx/demoddab/dabdemodsink.cpp | 9 +++------ plugins/channelrx/demoddab/readme.md | 8 +++++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/plugins/channelrx/demoddab/dabdemodsink.cpp b/plugins/channelrx/demoddab/dabdemodsink.cpp index c5cb95e0c..f73e4a59a 100644 --- a/plugins/channelrx/demoddab/dabdemodsink.cpp +++ b/plugins/channelrx/demoddab/dabdemodsink.cpp @@ -279,12 +279,10 @@ void motDataHandler(uint8_t *data, int len, const char *filename, int contentsub sink->motData(data, len, QString::fromUtf8(filename), contentsubType); } -// Missing ctx for tiiDataHandler - https://github.com/JvanKatwijk/dab-cmdline/issues/89 -DABDemodSink *tiiSink; - -void tiiDataHandler(int tii) +void tiiDataHandler(int tii, void *ctx) { - tiiSink->tii(tii); + DABDemodSink *sink = (DABDemodSink *)ctx; + sink->tii(tii); } void DABDemodSink::systemData(bool sync, int16_t snr, int32_t freqOffset) @@ -523,7 +521,6 @@ DABDemodSink::DABDemodSink(DABDemod *packetDemod) : m_api.motdata_Handler = motDataHandler; m_api.tii_data_Handler = tiiDataHandler; m_api.timeHandler = nullptr; - tiiSink = this; m_dab = dabInit(&m_device, &m_api, nullptr, diff --git a/plugins/channelrx/demoddab/readme.md b/plugins/channelrx/demoddab/readme.md index 8a60408f2..8ed9e0498 100644 --- a/plugins/channelrx/demoddab/readme.md +++ b/plugins/channelrx/demoddab/readme.md @@ -77,6 +77,12 @@ The statistics areas displays statistics generated by the demodulator that may g If you are hearing dropouts in audio, try adjusting your antenna in order to improve the reported SNR. +

Transmitter

+ +Displays the TII (Transmitter Identification Information) main and sub IDs in hexidecimal, which can identify which transmitter the DAB signal is being primarily received from. +Pressing the "Find Transmitter on Map" button will attempt to locate the transmitter with the same IDs and Ensemble name on the [Map](../../feature/map/readme.md) feature. +

Attribution

-The DAB demodulator used DAB library by Jvan Katwijk. +The DAB demodulator uses the DAB library by Jvan Katwijk. + From 1b99d1a80b227eeee020da2856936c04469bd54a Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 3 Mar 2023 22:55:15 +0000 Subject: [PATCH 2/2] Make comparisons case insensitive, as DAB ensemble names in database may not match transmitted. --- plugins/feature/map/mapmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/feature/map/mapmodel.cpp b/plugins/feature/map/mapmodel.cpp index 7827460c0..d7d8146e9 100644 --- a/plugins/feature/map/mapmodel.cpp +++ b/plugins/feature/map/mapmodel.cpp @@ -586,7 +586,7 @@ ObjectMapItem *ObjectMapModel::findMapItem(const QString& name) while (i.hasNext()) { MapItem *item = i.next(); - if (item->m_name == name) { + if (!item->m_name.compare(name, Qt::CaseInsensitive)) { return (ObjectMapItem *)item; } }