From e79c32de14025d60cdf354ccb09b8b0272adf47b Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 1 Sep 2023 20:10:40 +0100 Subject: [PATCH 1/2] Regenerate swagger --- swagger/sdrangel/code/html2/index.html | 6 +---- .../code/qt5/client/SWGRTTYModSettings.cpp | 23 ------------------- .../code/qt5/client/SWGRTTYModSettings.h | 6 ----- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index dda20ebe0..c35209233 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -11828,10 +11828,6 @@ margin-bottom: 20px; "lpfTaps" : { "type" : "integer" }, - "bbNoise" : { - "type" : "integer", - "description" : "Boolean\n * 0 - off\n * 1 - on\n" - }, "rfNoise" : { "type" : "integer", "description" : "Boolean\n * 0 - off\n * 1 - on\n" @@ -57998,7 +57994,7 @@ except ApiException as e:
- Generated 2023-09-01T20:07:45.995+02:00 + Generated 2023-09-01T21:10:19.928+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.cpp index f45d6c82b..9f97b97ae 100644 --- a/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.cpp @@ -46,8 +46,6 @@ SWGRTTYModSettings::SWGRTTYModSettings() { m_repeat_count_isSet = false; lpf_taps = 0; m_lpf_taps_isSet = false; - bb_noise = 0; - m_bb_noise_isSet = false; rf_noise = 0; m_rf_noise_isSet = false; text = nullptr; @@ -122,8 +120,6 @@ SWGRTTYModSettings::init() { m_repeat_count_isSet = false; lpf_taps = 0; m_lpf_taps_isSet = false; - bb_noise = 0; - m_bb_noise_isSet = false; rf_noise = 0; m_rf_noise_isSet = false; text = new QString(""); @@ -186,7 +182,6 @@ SWGRTTYModSettings::cleanup() { - if(text != nullptr) { delete text; } @@ -253,8 +248,6 @@ SWGRTTYModSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&lpf_taps, pJson["lpfTaps"], "qint32", ""); - ::SWGSDRangel::setValue(&bb_noise, pJson["bbNoise"], "qint32", ""); - ::SWGSDRangel::setValue(&rf_noise, pJson["rfNoise"], "qint32", ""); ::SWGSDRangel::setValue(&text, pJson["text"], "QString", "QString"); @@ -346,9 +339,6 @@ SWGRTTYModSettings::asJsonObject() { if(m_lpf_taps_isSet){ obj->insert("lpfTaps", QJsonValue(lpf_taps)); } - if(m_bb_noise_isSet){ - obj->insert("bbNoise", QJsonValue(bb_noise)); - } if(m_rf_noise_isSet){ obj->insert("rfNoise", QJsonValue(rf_noise)); } @@ -515,16 +505,6 @@ SWGRTTYModSettings::setLpfTaps(qint32 lpf_taps) { this->m_lpf_taps_isSet = true; } -qint32 -SWGRTTYModSettings::getBbNoise() { - return bb_noise; -} -void -SWGRTTYModSettings::setBbNoise(qint32 bb_noise) { - this->bb_noise = bb_noise; - this->m_bb_noise_isSet = true; -} - qint32 SWGRTTYModSettings::getRfNoise() { return rf_noise; @@ -797,9 +777,6 @@ SWGRTTYModSettings::isSet(){ if(m_lpf_taps_isSet){ isObjectUpdated = true; break; } - if(m_bb_noise_isSet){ - isObjectUpdated = true; break; - } if(m_rf_noise_isSet){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.h b/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.h index 7a6b8e41b..9e4aeee0b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGRTTYModSettings.h @@ -71,9 +71,6 @@ public: qint32 getLpfTaps(); void setLpfTaps(qint32 lpf_taps); - qint32 getBbNoise(); - void setBbNoise(qint32 bb_noise); - qint32 getRfNoise(); void setRfNoise(qint32 rf_noise); @@ -177,9 +174,6 @@ private: qint32 lpf_taps; bool m_lpf_taps_isSet; - qint32 bb_noise; - bool m_bb_noise_isSet; - qint32 rf_noise; bool m_rf_noise_isSet; From c947ef0c23f6a06118001c4e84eb9cbb9e9134e2 Mon Sep 17 00:00:00 2001 From: srcejon Date: Mon, 4 Sep 2023 13:25:25 +0100 Subject: [PATCH 2/2] Fix compiler warnings --- plugins/channeltx/modrtty/rttymodsource.cpp | 5 ++--- sdrbase/dsp/raisedcosine.h | 2 +- sdrbase/util/baudot.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/channeltx/modrtty/rttymodsource.cpp b/plugins/channeltx/modrtty/rttymodsource.cpp index a42ce7a87..aec6351ac 100644 --- a/plugins/channeltx/modrtty/rttymodsource.cpp +++ b/plugins/channeltx/modrtty/rttymodsource.cpp @@ -420,10 +420,9 @@ void RttyModSource::encodeText(const QString& text) { unsigned bits; unsigned bitCount; - bool error; - error = m_rttyEncoder.encode(s[i], bits, bitCount); - for (int j = 0; j < bitCount; j++) + m_rttyEncoder.encode(s[i], bits, bitCount); + for (unsigned int j = 0; j < bitCount; j++) { int txBit = (bits >> j) & 1; addBit(txBit); diff --git a/sdrbase/dsp/raisedcosine.h b/sdrbase/dsp/raisedcosine.h index 7975901a4..6c7438394 100644 --- a/sdrbase/dsp/raisedcosine.h +++ b/sdrbase/dsp/raisedcosine.h @@ -40,7 +40,7 @@ public: void create(double beta, int symbolSpan, int samplesPerSymbol, bool normaliseUpsampledAmplitude = false) { int nTaps = symbolSpan * samplesPerSymbol + 1; - int i, j; + int i; // check constraints if(!(nTaps & 1)) { diff --git a/sdrbase/util/baudot.cpp b/sdrbase/util/baudot.cpp index 00cfd09cc..56e50b240 100644 --- a/sdrbase/util/baudot.cpp +++ b/sdrbase/util/baudot.cpp @@ -307,7 +307,7 @@ bool BaudotEncoder::encode(QChar c, unsigned &bits, unsigned int &bitCount) // Look for character in other pages const QString switchPage[] = { ">", "<", "\0" }; - for (int page = m_page == LETTERS ? 1 : 0; page < (m_characterSet == Baudot::RUSSIAN) ? 3 : 2; page++) + for (int page = m_page == LETTERS ? 1 : 0; page < ((m_characterSet == Baudot::RUSSIAN) ? 3 : 2); page++) { if (m_chars[page].contains(s)) {