diff --git a/plugins/channeltx/modam/ammodsettings.cpp b/plugins/channeltx/modam/ammodsettings.cpp index 4750b66d6..ad044d512 100644 --- a/plugins/channeltx/modam/ammodsettings.cpp +++ b/plugins/channeltx/modam/ammodsettings.cpp @@ -112,10 +112,11 @@ bool AMModSettings::deserialize(const QByteArray& data) d.readU32(5, &m_rgbColor); d.readReal(6, &m_volumeFactor, 1.0); d.readBlob(7, &bytetmp); - m_cwKeyerSettings.deserialize(bytetmp); if (m_cwKeyerGUI) { m_cwKeyerGUI->deserialize(bytetmp); + } else { // standalone operation with presets + m_cwKeyerSettings.deserialize(bytetmp); } if (m_channelMarker) { diff --git a/plugins/channeltx/modfreedv/freedvmodsettings.cpp b/plugins/channeltx/modfreedv/freedvmodsettings.cpp index 392f57416..9de739176 100644 --- a/plugins/channeltx/modfreedv/freedvmodsettings.cpp +++ b/plugins/channeltx/modfreedv/freedvmodsettings.cpp @@ -66,6 +66,8 @@ QByteArray FreeDVModSettings::serialize() const if (m_cwKeyerGUI) { s.writeBlob(6, m_cwKeyerGUI->serialize()); + } else { // standalone operation with presets + s.writeBlob(6, m_cwKeyerSettings.serialize()); } s.writeBool(7, m_gaugeInputElseModem); @@ -117,10 +119,12 @@ bool FreeDVModSettings::deserialize(const QByteArray& data) } d.readU32(5, &m_rgbColor); + d.readBlob(6, &bytetmp); if (m_cwKeyerGUI) { - d.readBlob(6, &bytetmp); m_cwKeyerGUI->deserialize(bytetmp); + } else { // standalone operation with presets + m_cwKeyerSettings.deserialize(bytetmp); } d.readBool(7, &m_gaugeInputElseModem, false); diff --git a/plugins/channeltx/modfreedv/freedvmodsettings.h b/plugins/channeltx/modfreedv/freedvmodsettings.h index 77d689cc1..fcb3f2c60 100644 --- a/plugins/channeltx/modfreedv/freedvmodsettings.h +++ b/plugins/channeltx/modfreedv/freedvmodsettings.h @@ -22,6 +22,8 @@ #include #include +#include "dsp/cwkeyersettings.h" + class Serializable; struct FreeDVModSettings @@ -68,6 +70,8 @@ struct FreeDVModSettings Serializable *m_spectrumGUI; Serializable *m_cwKeyerGUI; + CWKeyerSettings m_cwKeyerSettings; //!< For standalone deserialize operation (without m_cwKeyerGUI) + FreeDVModSettings(); void resetToDefaults(); void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } @@ -75,6 +79,8 @@ struct FreeDVModSettings void setCWKeyerGUI(Serializable *cwKeyerGUI) { m_cwKeyerGUI = cwKeyerGUI; } QByteArray serialize() const; bool deserialize(const QByteArray& data); + const CWKeyerSettings& getCWKeyerSettings() const { return m_cwKeyerSettings; } + void setCWKeyerSettings(const CWKeyerSettings& cwKeyerSettings) { m_cwKeyerSettings = cwKeyerSettings; } static int getHiCutoff(FreeDVMode freeDVMode); static int getLowCutoff(FreeDVMode freeDVMode); diff --git a/plugins/channeltx/modfreedv/freedvmodwebapiadapter.cpp b/plugins/channeltx/modfreedv/freedvmodwebapiadapter.cpp index b1379ca04..cdd60a4f2 100644 --- a/plugins/channeltx/modfreedv/freedvmodwebapiadapter.cpp +++ b/plugins/channeltx/modfreedv/freedvmodwebapiadapter.cpp @@ -16,7 +16,6 @@ /////////////////////////////////////////////////////////////////////////////////// #include "SWGChannelSettings.h" -#include "settings/serializable.h" #include "freedvmod.h" #include "freedvmodwebapiadapter.h" @@ -35,19 +34,11 @@ int FreeDVModWebAPIAdapter::webapiSettingsGet( response.setFreeDvModSettings(new SWGSDRangel::SWGFreeDVModSettings()); response.getFreeDvModSettings()->init(); FreeDVMod::webapiFormatChannelSettings(response, m_settings); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (cwKeyerGUI) - { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getFreeDvModSettings()->getCwKeyer(); - CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); - } - } + const CWKeyerSettings& cwKeyerSettings = m_settings.getCWKeyerSettings(); + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getFreeDvModSettings()->getCwKeyer(); + apiCwKeyerSettings->init(); + CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); return 200; } @@ -60,20 +51,14 @@ int FreeDVModWebAPIAdapter::webapiSettingsPutPatch( { (void) errorMessage; FreeDVMod::webapiUpdateChannelSettings(m_settings, channelSettingsKeys, response); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (channelSettingsKeys.contains("cwKeyer") && cwKeyerGUI) + if (channelSettingsKeys.contains("cwKeyer")) { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getFreeDvModSettings()->getCwKeyer(); - CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, cwKeyerSettings, apiCwKeyerSettings); - const QByteArray& serializedNewCWKeyerSettings = cwKeyerSettings.serialize(); - cwKeyerGUI->deserialize(serializedNewCWKeyerSettings); - } + CWKeyerSettings newCWKeyerSettings; + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getFreeDvModSettings()->getCwKeyer(); + CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, newCWKeyerSettings, apiCwKeyerSettings); + m_settings.setCWKeyerSettings(newCWKeyerSettings); + const QByteArray& serializedNewSettings = m_settings.serialize(); // effectively update CW keyer settings } FreeDVMod::webapiFormatChannelSettings(response, m_settings); diff --git a/plugins/channeltx/modnfm/nfmmodsettings.cpp b/plugins/channeltx/modnfm/nfmmodsettings.cpp index 85bd1e76c..8050acd75 100644 --- a/plugins/channeltx/modnfm/nfmmodsettings.cpp +++ b/plugins/channeltx/modnfm/nfmmodsettings.cpp @@ -84,6 +84,8 @@ QByteArray NFMModSettings::serialize() const if (m_cwKeyerGUI) { s.writeBlob(8, m_cwKeyerGUI->serialize()); + } else { // standalone operation with presets + s.writeBlob(6, m_cwKeyerSettings.serialize()); } if (m_channelMarker) { @@ -131,10 +133,12 @@ bool NFMModSettings::deserialize(const QByteArray& data) d.readU32(5, &m_rgbColor); d.readReal(6, &m_toneFrequency, 1000.0); d.readReal(7, &m_volumeFactor, 1.0); + d.readBlob(8, &bytetmp); if (m_cwKeyerGUI) { - d.readBlob(8, &bytetmp); m_cwKeyerGUI->deserialize(bytetmp); + } else { // standalone operation with presets + m_cwKeyerSettings.deserialize(bytetmp); } d.readBool(9, &m_ctcssOn, false); diff --git a/plugins/channeltx/modnfm/nfmmodsettings.h b/plugins/channeltx/modnfm/nfmmodsettings.h index 780db9428..0e1b6f327 100644 --- a/plugins/channeltx/modnfm/nfmmodsettings.h +++ b/plugins/channeltx/modnfm/nfmmodsettings.h @@ -20,6 +20,8 @@ #include +#include "dsp/cwkeyersettings.h" + class Serializable; struct NFMModSettings @@ -64,12 +66,16 @@ struct NFMModSettings Serializable *m_channelMarker; Serializable *m_cwKeyerGUI; + CWKeyerSettings m_cwKeyerSettings; //!< For standalone deserialize operation (without m_cwKeyerGUI) + NFMModSettings(); void resetToDefaults(); void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } void setCWKeyerGUI(Serializable *cwKeyerGUI) { m_cwKeyerGUI = cwKeyerGUI; } QByteArray serialize() const; bool deserialize(const QByteArray& data); + const CWKeyerSettings& getCWKeyerSettings() const { return m_cwKeyerSettings; } + void setCWKeyerSettings(const CWKeyerSettings& cwKeyerSettings) { m_cwKeyerSettings = cwKeyerSettings; } static int getRFBW(int index); static int getRFBWIndex(int rfbw); diff --git a/plugins/channeltx/modnfm/nfmmodwebapiadapter.cpp b/plugins/channeltx/modnfm/nfmmodwebapiadapter.cpp index 04468562d..06722ab43 100644 --- a/plugins/channeltx/modnfm/nfmmodwebapiadapter.cpp +++ b/plugins/channeltx/modnfm/nfmmodwebapiadapter.cpp @@ -16,7 +16,6 @@ /////////////////////////////////////////////////////////////////////////////////// #include "SWGChannelSettings.h" -#include "settings/serializable.h" #include "nfmmod.h" #include "nfmmodwebapiadapter.h" @@ -35,19 +34,11 @@ int NFMModWebAPIAdapter::webapiSettingsGet( response.setNfmModSettings(new SWGSDRangel::SWGNFMModSettings()); response.getNfmModSettings()->init(); NFMMod::webapiFormatChannelSettings(response, m_settings); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (cwKeyerGUI) - { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getNfmModSettings()->getCwKeyer(); - CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); - } - } + const CWKeyerSettings& cwKeyerSettings = m_settings.getCWKeyerSettings(); + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getNfmModSettings()->getCwKeyer(); + apiCwKeyerSettings->init(); + CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); return 200; } @@ -60,20 +51,14 @@ int NFMModWebAPIAdapter::webapiSettingsPutPatch( { (void) errorMessage; NFMMod::webapiUpdateChannelSettings(m_settings, channelSettingsKeys, response); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (channelSettingsKeys.contains("cwKeyer") && cwKeyerGUI) + if (channelSettingsKeys.contains("cwKeyer")) { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getNfmModSettings()->getCwKeyer(); - CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, cwKeyerSettings, apiCwKeyerSettings); - const QByteArray& serializedNewCWKeyerSettings = cwKeyerSettings.serialize(); - cwKeyerGUI->deserialize(serializedNewCWKeyerSettings); - } + CWKeyerSettings newCWKeyerSettings; + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getNfmModSettings()->getCwKeyer(); + CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, newCWKeyerSettings, apiCwKeyerSettings); + m_settings.setCWKeyerSettings(newCWKeyerSettings); + const QByteArray& serializedNewSettings = m_settings.serialize(); // effectively update CW keyer settings } NFMMod::webapiFormatChannelSettings(response, m_settings); diff --git a/plugins/channeltx/modssb/ssbmodsettings.cpp b/plugins/channeltx/modssb/ssbmodsettings.cpp index 0b4e56f5e..034a63750 100644 --- a/plugins/channeltx/modssb/ssbmodsettings.cpp +++ b/plugins/channeltx/modssb/ssbmodsettings.cpp @@ -89,6 +89,8 @@ QByteArray SSBModSettings::serialize() const if (m_cwKeyerGUI) { s.writeBlob(6, m_cwKeyerGUI->serialize()); + } else { // standalone operation with presets + s.writeBlob(6, m_cwKeyerSettings.serialize()); } s.writeS32(7, roundf(m_lowCutoff / 100.0)); @@ -149,10 +151,12 @@ bool SSBModSettings::deserialize(const QByteArray& data) } d.readU32(5, &m_rgbColor); + d.readBlob(6, &bytetmp); if (m_cwKeyerGUI) { - d.readBlob(6, &bytetmp); m_cwKeyerGUI->deserialize(bytetmp); + } else { // standalone operation with presets + m_cwKeyerSettings.deserialize(bytetmp); } d.readS32(7, &tmp, 3); diff --git a/plugins/channeltx/modssb/ssbmodsettings.h b/plugins/channeltx/modssb/ssbmodsettings.h index 445737425..4ba5c2850 100644 --- a/plugins/channeltx/modssb/ssbmodsettings.h +++ b/plugins/channeltx/modssb/ssbmodsettings.h @@ -22,6 +22,8 @@ #include #include +#include "dsp/cwkeyersettings.h" + class Serializable; struct SSBModSettings @@ -70,6 +72,8 @@ struct SSBModSettings Serializable *m_spectrumGUI; Serializable *m_cwKeyerGUI; + CWKeyerSettings m_cwKeyerSettings; //!< For standalone deserialize operation (without m_cwKeyerGUI) + SSBModSettings(); void resetToDefaults(); void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } @@ -77,6 +81,8 @@ struct SSBModSettings void setCWKeyerGUI(Serializable *cwKeyerGUI) { m_cwKeyerGUI = cwKeyerGUI; } QByteArray serialize() const; bool deserialize(const QByteArray& data); + const CWKeyerSettings& getCWKeyerSettings() const { return m_cwKeyerSettings; } + void setCWKeyerSettings(const CWKeyerSettings& cwKeyerSettings) { m_cwKeyerSettings = cwKeyerSettings; } }; diff --git a/plugins/channeltx/modssb/ssbmodwebapiadapter.cpp b/plugins/channeltx/modssb/ssbmodwebapiadapter.cpp index 8885ed817..492c8c20e 100644 --- a/plugins/channeltx/modssb/ssbmodwebapiadapter.cpp +++ b/plugins/channeltx/modssb/ssbmodwebapiadapter.cpp @@ -16,7 +16,6 @@ /////////////////////////////////////////////////////////////////////////////////// #include "SWGChannelSettings.h" -#include "settings/serializable.h" #include "ssbmod.h" #include "ssbmodwebapiadapter.h" @@ -35,19 +34,11 @@ int SSBModWebAPIAdapter::webapiSettingsGet( response.setSsbModSettings(new SWGSDRangel::SWGSSBModSettings()); response.getSsbModSettings()->init(); SSBMod::webapiFormatChannelSettings(response, m_settings); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (cwKeyerGUI) - { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getSsbModSettings()->getCwKeyer(); - CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); - } - } + const CWKeyerSettings& cwKeyerSettings = m_settings.getCWKeyerSettings(); + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getSsbModSettings()->getCwKeyer(); + apiCwKeyerSettings->init(); + CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); return 200; } @@ -60,20 +51,14 @@ int SSBModWebAPIAdapter::webapiSettingsPutPatch( { (void) errorMessage; SSBMod::webapiUpdateChannelSettings(m_settings, channelSettingsKeys, response); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (channelSettingsKeys.contains("cwKeyer") && cwKeyerGUI) + if (channelSettingsKeys.contains("cwKeyer")) { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getSsbModSettings()->getCwKeyer(); - CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, cwKeyerSettings, apiCwKeyerSettings); - const QByteArray& serializedNewCWKeyerSettings = cwKeyerSettings.serialize(); - cwKeyerGUI->deserialize(serializedNewCWKeyerSettings); - } + CWKeyerSettings newCWKeyerSettings; + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getSsbModSettings()->getCwKeyer(); + CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, newCWKeyerSettings, apiCwKeyerSettings); + m_settings.setCWKeyerSettings(newCWKeyerSettings); + const QByteArray& serializedNewSettings = m_settings.serialize(); // effectively update CW keyer settings } SSBMod::webapiFormatChannelSettings(response, m_settings); diff --git a/plugins/channeltx/modwfm/wfmmodsettings.cpp b/plugins/channeltx/modwfm/wfmmodsettings.cpp index 78ddbae34..7ddc36909 100644 --- a/plugins/channeltx/modwfm/wfmmodsettings.cpp +++ b/plugins/channeltx/modwfm/wfmmodsettings.cpp @@ -71,6 +71,8 @@ QByteArray WFMModSettings::serialize() const if (m_cwKeyerGUI) { s.writeBlob(8, m_cwKeyerGUI->serialize()); + } else { // standalone operation with presets + s.writeBlob(6, m_cwKeyerSettings.serialize()); } if (m_channelMarker) { @@ -113,10 +115,12 @@ bool WFMModSettings::deserialize(const QByteArray& data) d.readU32(5, &m_rgbColor); d.readReal(6, &m_toneFrequency, 1000.0); d.readReal(7, &m_volumeFactor, 1.0); + d.readBlob(8, &bytetmp); if (m_cwKeyerGUI) { - d.readBlob(8, &bytetmp); m_cwKeyerGUI->deserialize(bytetmp); + } else { // standalone operation with presets + m_cwKeyerSettings.deserialize(bytetmp); } if (m_channelMarker) { diff --git a/plugins/channeltx/modwfm/wfmmodsettings.h b/plugins/channeltx/modwfm/wfmmodsettings.h index 4b03e7c5e..1e7507db3 100644 --- a/plugins/channeltx/modwfm/wfmmodsettings.h +++ b/plugins/channeltx/modwfm/wfmmodsettings.h @@ -20,6 +20,8 @@ #include +#include "dsp/cwkeyersettings.h" + class Serializable; struct WFMModSettings @@ -57,12 +59,16 @@ struct WFMModSettings Serializable *m_channelMarker; Serializable *m_cwKeyerGUI; + CWKeyerSettings m_cwKeyerSettings; //!< For standalone deserialize operation (without m_cwKeyerGUI) + WFMModSettings(); void resetToDefaults(); void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } void setCWKeyerGUI(Serializable *cwKeyerGUI) { m_cwKeyerGUI = cwKeyerGUI; } QByteArray serialize() const; bool deserialize(const QByteArray& data); + const CWKeyerSettings& getCWKeyerSettings() const { return m_cwKeyerSettings; } + void setCWKeyerSettings(const CWKeyerSettings& cwKeyerSettings) { m_cwKeyerSettings = cwKeyerSettings; } static int getRFBW(int index); static int getRFBWIndex(int rfbw); diff --git a/plugins/channeltx/modwfm/wfmmodwebapiadapter.cpp b/plugins/channeltx/modwfm/wfmmodwebapiadapter.cpp index 734f536e2..f910d47b9 100644 --- a/plugins/channeltx/modwfm/wfmmodwebapiadapter.cpp +++ b/plugins/channeltx/modwfm/wfmmodwebapiadapter.cpp @@ -16,7 +16,6 @@ /////////////////////////////////////////////////////////////////////////////////// #include "SWGChannelSettings.h" -#include "settings/serializable.h" #include "wfmmod.h" #include "wfmmodwebapiadapter.h" @@ -35,19 +34,11 @@ int WFMModWebAPIAdapter::webapiSettingsGet( response.setWfmModSettings(new SWGSDRangel::SWGWFMModSettings()); response.getWfmModSettings()->init(); WFMMod::webapiFormatChannelSettings(response, m_settings); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (cwKeyerGUI) - { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getWfmModSettings()->getCwKeyer(); - CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); - } - } + const CWKeyerSettings& cwKeyerSettings = m_settings.getCWKeyerSettings(); + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getWfmModSettings()->getCwKeyer(); + apiCwKeyerSettings->init(); + CWKeyer::webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings); return 200; } @@ -60,20 +51,14 @@ int WFMModWebAPIAdapter::webapiSettingsPutPatch( { (void) errorMessage; WFMMod::webapiUpdateChannelSettings(m_settings, channelSettingsKeys, response); - Serializable *cwKeyerGUI = m_settings.m_cwKeyerGUI; - if (channelSettingsKeys.contains("cwKeyer") && cwKeyerGUI) + if (channelSettingsKeys.contains("cwKeyer")) { - const QByteArray& serializedCWKeyerSettings = cwKeyerGUI->serialize(); - CWKeyerSettings cwKeyerSettings; - - if (cwKeyerSettings.deserialize(serializedCWKeyerSettings)) - { - SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getWfmModSettings()->getCwKeyer(); - CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, cwKeyerSettings, apiCwKeyerSettings); - const QByteArray& serializedNewCWKeyerSettings = cwKeyerSettings.serialize(); - cwKeyerGUI->deserialize(serializedNewCWKeyerSettings); - } + CWKeyerSettings newCWKeyerSettings; + SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = response.getWfmModSettings()->getCwKeyer(); + CWKeyer::webapiSettingsPutPatch(channelSettingsKeys, newCWKeyerSettings, apiCwKeyerSettings); + m_settings.setCWKeyerSettings(newCWKeyerSettings); + const QByteArray& serializedNewSettings = m_settings.serialize(); // effectively update CW keyer settings } WFMMod::webapiFormatChannelSettings(response, m_settings);