From 618f302aad2a235e4825aeca5ba718d3bb74a347 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 13 Jan 2017 02:16:28 +0100 Subject: [PATCH] DSD demod: adapt to dsdcc version 1.6 --- debian/changelog | 6 +++ plugins/channelrx/demoddsd/dsddecoder.h | 4 +- plugins/channelrx/demoddsd/dsddemodgui.cpp | 45 +++---------------- plugins/channelrx/demoddsd/dsddemodgui.h | 5 --- plugins/channelrx/demoddsd/dsddemodplugin.cpp | 2 +- sdrbase/gui/aboutdialog.ui | 2 +- sdrbase/mainwindow.cpp | 4 +- 7 files changed, 17 insertions(+), 51 deletions(-) diff --git a/debian/changelog b/debian/changelog index be0c05435..c7ffc4a84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sdrangel (3.1.1-1) unstable; urgency=medium + + * DSD demod: adapt to dsdcc version 1.6 + + -- Edouard Griffiths, F4EXB Fri, 13 Jan 2017 03:14:18 +0100 + sdrangel (3.1.0-1) unstable; urgency=medium * HackRF Tx support diff --git a/plugins/channelrx/demoddsd/dsddecoder.h b/plugins/channelrx/demoddsd/dsddecoder.h index 7ab46ad17..a0c11221a 100644 --- a/plugins/channelrx/demoddsd/dsddecoder.h +++ b/plugins/channelrx/demoddsd/dsddecoder.h @@ -60,9 +60,7 @@ public: DSDcc::DSDDecoder::DSDSyncType getSyncType() const { return m_decoder.getSyncType(); } DSDcc::DSDDecoder::DSDStationType getStationType() const { return m_decoder.getStationType(); } const char *getFrameTypeText() const { return m_decoder.getFrameTypeText(); } - const char *getSlot0Text() const { return m_decoder.getSlot0Text(); } - const char *getSlot1Text() const { return m_decoder.getSlot1Text(); } - unsigned char getColorCode() const { return m_decoder.getColorCode(); } + const DSDcc::DSDDMR& getDMRDecoder() const { return m_decoder.getDMRDecoder(); } const DSDcc::DSDDstar& getDStarDecoder() const { return m_decoder.getDStarDecoder(); } const DSDcc::DSDdPMR& getDPMRDecoder() const { return m_decoder.getDPMRDecoder(); } const DSDcc::DSDYSF& getYSFDecoder() const { return m_decoder.getYSFDecoder(); } diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp index e1737920a..6b5c7186d 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.cpp +++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp @@ -42,39 +42,6 @@ unsigned int DSDDemodBaudRates::m_rates[] = {2400, 4800}; unsigned int DSDDemodBaudRates::m_nb_rates = 2; unsigned int DSDDemodBaudRates::m_defaultRateIndex = 1; // 4800 bauds -char DSDDemodGUI::m_dpmrFrameTypes[][3] = { - "--", // 0: no frame sync - "XS", // 1: no frame - extensive search of FS2 - "HD", // 2: header frame - "PY", // 3: payload super frame not categorized yet - "VO", // 4: voice super frame - "VD", // 5: voice and data superframe - "D1", // 6: data type 1 super frame - "D2", // 7: data type 2 super frame - "EN", // 8: end frame -}; - -const char * DSDDemodGUI::m_ysfChannelTypeText[4] = { - "H", //!< Header Channel - "C", //!< Communications Channel - "T", //!< Termination Channel - "S" //!< Test -}; - -const char * DSDDemodGUI::m_ysfDataTypeText[4] = { - "V1", //!< Voice/Data type 1 - "DF", //!< Data Full Rate - "V2", //!< Voice/Data type 2 - "VF" //!< Voice Full Rate -}; - -const char * DSDDemodGUI::m_ysfCallModeText[4] = { - "GC", //!< Group CQ - "RI", //!< Radio ID - "RS", //!< Reserved - "IN" //!< Individual -}; - DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI) { DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceAPI); @@ -505,8 +472,8 @@ void DSDDemodGUI::formatStatusText() break; } - memcpy(&m_formatStatusText[12], m_dsdDemod->getDecoder().getSlot0Text(), 26); - memcpy(&m_formatStatusText[43], m_dsdDemod->getDecoder().getSlot1Text(), 26); + memcpy(&m_formatStatusText[12], m_dsdDemod->getDecoder().getDMRDecoder().getSlot0Text(), 26); + memcpy(&m_formatStatusText[43], m_dsdDemod->getDecoder().getDMRDecoder().getSlot1Text(), 26); m_signalFormat = signalFormatDMR; break; case DSDcc::DSDDecoder::DSDSyncDStarHeaderN: @@ -551,7 +518,7 @@ void DSDDemodGUI::formatStatusText() break; case DSDcc::DSDDecoder::DSDSyncDPMR: sprintf(m_formatStatusText, "%s CC: %04d OI: %08d CI: %08d", - m_dpmrFrameTypes[(int) m_dsdDemod->getDecoder().getDPMRDecoder().getFrameType()], + DSDcc::DSDdPMR::dpmrFrameTypes[(int) m_dsdDemod->getDecoder().getDPMRDecoder().getFrameType()], m_dsdDemod->getDecoder().getDPMRDecoder().getColorCode(), m_dsdDemod->getDecoder().getDPMRDecoder().getOwnId(), m_dsdDemod->getDecoder().getDPMRDecoder().getCalledId()); @@ -563,7 +530,7 @@ void DSDDemodGUI::formatStatusText() // C V2 RI 0:7 WL000|ssssssssss>dddddddddd |UUUUUUUUUU>DDDDDDDDDD|44444 if (m_dsdDemod->getDecoder().getYSFDecoder().getFICHError() == DSDcc::DSDYSF::FICHNoError) { - sprintf(m_formatStatusText, "%s ", m_ysfChannelTypeText[(int) m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getFrameInformation()]); + sprintf(m_formatStatusText, "%s ", DSDcc::DSDYSF::ysfChannelTypeText[(int) m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getFrameInformation()]); } else { @@ -571,8 +538,8 @@ void DSDDemodGUI::formatStatusText() } sprintf(&m_formatStatusText[2], "%s %s %d:%d %c%c", - m_ysfDataTypeText[(int) m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getDataType()], - m_ysfCallModeText[(int) m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getCallMode()], + DSDcc::DSDYSF::ysfDataTypeText[(int) m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getDataType()], + DSDcc::DSDYSF::ysfCallModeText[(int) m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getCallMode()], m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getBlockTotal(), m_dsdDemod->getDecoder().getYSFDecoder().getFICH().getFrameTotal(), (m_dsdDemod->getDecoder().getYSFDecoder().getFICH().isNarrowMode() ? 'N' : 'W'), diff --git a/plugins/channelrx/demoddsd/dsddemodgui.h b/plugins/channelrx/demoddsd/dsddemodgui.h index 7b8b47edf..50a55b76c 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.h +++ b/plugins/channelrx/demoddsd/dsddemodgui.h @@ -115,11 +115,6 @@ private: float m_myLatitude; float m_myLongitude; - static char m_dpmrFrameTypes[9][3]; - static const char *m_ysfChannelTypeText[4]; - static const char *m_ysfDataTypeText[4]; - static const char *m_ysfCallModeText[4]; - explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL); virtual ~DSDDemodGUI(); diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index ac120dde4..f039e336e 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -24,7 +24,7 @@ const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = { QString("DSD Demodulator"), - QString("2.5.1"), + QString("3.1.1"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/sdrbase/gui/aboutdialog.ui b/sdrbase/gui/aboutdialog.ui index 7417175e5..a8b2de639 100644 --- a/sdrbase/gui/aboutdialog.ui +++ b/sdrbase/gui/aboutdialog.ui @@ -84,7 +84,7 @@ - <html><head/><body><p>Version 3.1.0 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html> + <html><head/><body><p>Version 3.1.1 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html> true diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 0cc662b8f..9e1b45246 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -453,9 +453,9 @@ void MainWindow::createStatusBar() { QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR); #if QT_VERSION >= 0x050400 - m_showSystemWidget = new QLabel("SDRangel v3.1.0 " + qtVersionStr + QSysInfo::prettyProductName(), this); + m_showSystemWidget = new QLabel("SDRangel v3.1.1 " + qtVersionStr + QSysInfo::prettyProductName(), this); #else - m_showSystemWidget = new QLabel("SDRangel v3.1.0 " + qtVersionStr, this); + m_showSystemWidget = new QLabel("SDRangel v3.1.1 " + qtVersionStr, this); #endif statusBar()->addPermanentWidget(m_showSystemWidget);