mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 11:12:27 -04:00
NFM Mod: API updates
This commit is contained in:
parent
d4c73ce194
commit
910e69e789
@ -566,6 +566,12 @@ void NFMMod::webapiUpdateChannelSettings(
|
|||||||
if (channelSettingsKeys.contains("dcsPositive")) {
|
if (channelSettingsKeys.contains("dcsPositive")) {
|
||||||
settings.m_dcsPositive = response.getNfmModSettings()->getDcsPositive() != 0;
|
settings.m_dcsPositive = response.getNfmModSettings()->getDcsPositive() != 0;
|
||||||
}
|
}
|
||||||
|
if (channelSettingsKeys.contains("preEmphasisOn")) {
|
||||||
|
settings.m_preEmphasisOn = response.getNfmModSettings()->getPreEmphasisOn() != 0;
|
||||||
|
}
|
||||||
|
if (channelSettingsKeys.contains("bpfOn")) {
|
||||||
|
settings.m_bpfOn = response.getNfmModSettings()->getBpfOn() != 0;
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("streamIndex")) {
|
if (channelSettingsKeys.contains("streamIndex")) {
|
||||||
settings.m_streamIndex = response.getNfmModSettings()->getStreamIndex();
|
settings.m_streamIndex = response.getNfmModSettings()->getStreamIndex();
|
||||||
}
|
}
|
||||||
@ -638,6 +644,8 @@ void NFMMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
|
|||||||
response.getNfmModSettings()->setDcsCode(settings.m_dcsCode);
|
response.getNfmModSettings()->setDcsCode(settings.m_dcsCode);
|
||||||
response.getNfmModSettings()->setDcsOn(settings.m_dcsOn ? 1 : 0);
|
response.getNfmModSettings()->setDcsOn(settings.m_dcsOn ? 1 : 0);
|
||||||
response.getNfmModSettings()->setDcsPositive(settings.m_dcsPositive ? 1 : 0);
|
response.getNfmModSettings()->setDcsPositive(settings.m_dcsPositive ? 1 : 0);
|
||||||
|
response.getNfmModSettings()->setPreEmphasisOn(settings.m_preEmphasisOn ? 1 : 0);
|
||||||
|
response.getNfmModSettings()->setBpfOn(settings.m_bpfOn ? 1 : 0);
|
||||||
response.getNfmModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
response.getNfmModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||||
|
|
||||||
if (response.getNfmModSettings()->getReverseApiAddress()) {
|
if (response.getNfmModSettings()->getReverseApiAddress()) {
|
||||||
@ -835,6 +843,12 @@ void NFMMod::webapiFormatChannelSettings(
|
|||||||
if (channelSettingsKeys.contains("dcsPositive") || force) {
|
if (channelSettingsKeys.contains("dcsPositive") || force) {
|
||||||
swgNFMModSettings->setDcsPositive(settings.m_dcsPositive ? 1 : 0);
|
swgNFMModSettings->setDcsPositive(settings.m_dcsPositive ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
if (channelSettingsKeys.contains("preEmphasisOn") || force) {
|
||||||
|
swgNFMModSettings->setPreEmphasisOn(settings.m_preEmphasisOn ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (channelSettingsKeys.contains("bpfOn") || force) {
|
||||||
|
swgNFMModSettings->setBpfOn(settings.m_bpfOn ? 1 : 0);
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||||
swgNFMModSettings->setStreamIndex(settings.m_streamIndex);
|
swgNFMModSettings->setStreamIndex(settings.m_streamIndex);
|
||||||
}
|
}
|
||||||
|
@ -8951,6 +8951,14 @@ margin-bottom: 20px;
|
|||||||
"modAFInput" : {
|
"modAFInput" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
|
"preEmphasisOn" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Activate pre-emphasis filter: * 0 - inactive * 1 - active\n"
|
||||||
|
},
|
||||||
|
"bpfOn" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Activate audio highpass filter when no CTCSS nor DCS: * 0 - inactive * 1 - active\n"
|
||||||
|
},
|
||||||
"streamIndex" : {
|
"streamIndex" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||||
@ -56161,7 +56169,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2022-05-31T23:33:55.570+02:00
|
Generated 2022-06-04T08:51:44.121+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,6 +53,18 @@ NFMModSettings:
|
|||||||
type: string
|
type: string
|
||||||
modAFInput:
|
modAFInput:
|
||||||
type: integer
|
type: integer
|
||||||
|
preEmphasisOn:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
Activate pre-emphasis filter:
|
||||||
|
* 0 - inactive
|
||||||
|
* 1 - active
|
||||||
|
bpfOn:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
Activate audio highpass filter when no CTCSS nor DCS:
|
||||||
|
* 0 - inactive
|
||||||
|
* 1 - active
|
||||||
streamIndex:
|
streamIndex:
|
||||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -53,6 +53,18 @@ NFMModSettings:
|
|||||||
type: string
|
type: string
|
||||||
modAFInput:
|
modAFInput:
|
||||||
type: integer
|
type: integer
|
||||||
|
preEmphasisOn:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
Activate pre-emphasis filter:
|
||||||
|
* 0 - inactive
|
||||||
|
* 1 - active
|
||||||
|
bpfOn:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
Activate audio highpass filter when no CTCSS nor DCS:
|
||||||
|
* 0 - inactive
|
||||||
|
* 1 - active
|
||||||
streamIndex:
|
streamIndex:
|
||||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -8951,6 +8951,14 @@ margin-bottom: 20px;
|
|||||||
"modAFInput" : {
|
"modAFInput" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
|
"preEmphasisOn" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Activate pre-emphasis filter: * 0 - inactive * 1 - active\n"
|
||||||
|
},
|
||||||
|
"bpfOn" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Activate audio highpass filter when no CTCSS nor DCS: * 0 - inactive * 1 - active\n"
|
||||||
|
},
|
||||||
"streamIndex" : {
|
"streamIndex" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||||
@ -56161,7 +56169,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2022-05-31T23:33:55.570+02:00
|
Generated 2022-06-04T08:51:44.121+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,6 +62,10 @@ SWGNFMModSettings::SWGNFMModSettings() {
|
|||||||
m_audio_device_name_isSet = false;
|
m_audio_device_name_isSet = false;
|
||||||
mod_af_input = 0;
|
mod_af_input = 0;
|
||||||
m_mod_af_input_isSet = false;
|
m_mod_af_input_isSet = false;
|
||||||
|
pre_emphasis_on = 0;
|
||||||
|
m_pre_emphasis_on_isSet = false;
|
||||||
|
bpf_on = 0;
|
||||||
|
m_bpf_on_isSet = false;
|
||||||
stream_index = 0;
|
stream_index = 0;
|
||||||
m_stream_index_isSet = false;
|
m_stream_index_isSet = false;
|
||||||
use_reverse_api = 0;
|
use_reverse_api = 0;
|
||||||
@ -122,6 +126,10 @@ SWGNFMModSettings::init() {
|
|||||||
m_audio_device_name_isSet = false;
|
m_audio_device_name_isSet = false;
|
||||||
mod_af_input = 0;
|
mod_af_input = 0;
|
||||||
m_mod_af_input_isSet = false;
|
m_mod_af_input_isSet = false;
|
||||||
|
pre_emphasis_on = 0;
|
||||||
|
m_pre_emphasis_on_isSet = false;
|
||||||
|
bpf_on = 0;
|
||||||
|
m_bpf_on_isSet = false;
|
||||||
stream_index = 0;
|
stream_index = 0;
|
||||||
m_stream_index_isSet = false;
|
m_stream_index_isSet = false;
|
||||||
use_reverse_api = 0;
|
use_reverse_api = 0;
|
||||||
@ -167,6 +175,8 @@ SWGNFMModSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(reverse_api_address != nullptr) {
|
if(reverse_api_address != nullptr) {
|
||||||
delete reverse_api_address;
|
delete reverse_api_address;
|
||||||
}
|
}
|
||||||
@ -229,6 +239,10 @@ SWGNFMModSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&mod_af_input, pJson["modAFInput"], "qint32", "");
|
::SWGSDRangel::setValue(&mod_af_input, pJson["modAFInput"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&pre_emphasis_on, pJson["preEmphasisOn"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&bpf_on, pJson["bpfOn"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||||
@ -314,6 +328,12 @@ SWGNFMModSettings::asJsonObject() {
|
|||||||
if(m_mod_af_input_isSet){
|
if(m_mod_af_input_isSet){
|
||||||
obj->insert("modAFInput", QJsonValue(mod_af_input));
|
obj->insert("modAFInput", QJsonValue(mod_af_input));
|
||||||
}
|
}
|
||||||
|
if(m_pre_emphasis_on_isSet){
|
||||||
|
obj->insert("preEmphasisOn", QJsonValue(pre_emphasis_on));
|
||||||
|
}
|
||||||
|
if(m_bpf_on_isSet){
|
||||||
|
obj->insert("bpfOn", QJsonValue(bpf_on));
|
||||||
|
}
|
||||||
if(m_stream_index_isSet){
|
if(m_stream_index_isSet){
|
||||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||||
}
|
}
|
||||||
@ -515,6 +535,26 @@ SWGNFMModSettings::setModAfInput(qint32 mod_af_input) {
|
|||||||
this->m_mod_af_input_isSet = true;
|
this->m_mod_af_input_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGNFMModSettings::getPreEmphasisOn() {
|
||||||
|
return pre_emphasis_on;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGNFMModSettings::setPreEmphasisOn(qint32 pre_emphasis_on) {
|
||||||
|
this->pre_emphasis_on = pre_emphasis_on;
|
||||||
|
this->m_pre_emphasis_on_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGNFMModSettings::getBpfOn() {
|
||||||
|
return bpf_on;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGNFMModSettings::setBpfOn(qint32 bpf_on) {
|
||||||
|
this->bpf_on = bpf_on;
|
||||||
|
this->m_bpf_on_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGNFMModSettings::getStreamIndex() {
|
SWGNFMModSettings::getStreamIndex() {
|
||||||
return stream_index;
|
return stream_index;
|
||||||
@ -661,6 +701,12 @@ SWGNFMModSettings::isSet(){
|
|||||||
if(m_mod_af_input_isSet){
|
if(m_mod_af_input_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_pre_emphasis_on_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
|
if(m_bpf_on_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_stream_index_isSet){
|
if(m_stream_index_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,12 @@ public:
|
|||||||
qint32 getModAfInput();
|
qint32 getModAfInput();
|
||||||
void setModAfInput(qint32 mod_af_input);
|
void setModAfInput(qint32 mod_af_input);
|
||||||
|
|
||||||
|
qint32 getPreEmphasisOn();
|
||||||
|
void setPreEmphasisOn(qint32 pre_emphasis_on);
|
||||||
|
|
||||||
|
qint32 getBpfOn();
|
||||||
|
void setBpfOn(qint32 bpf_on);
|
||||||
|
|
||||||
qint32 getStreamIndex();
|
qint32 getStreamIndex();
|
||||||
void setStreamIndex(qint32 stream_index);
|
void setStreamIndex(qint32 stream_index);
|
||||||
|
|
||||||
@ -178,6 +184,12 @@ private:
|
|||||||
qint32 mod_af_input;
|
qint32 mod_af_input;
|
||||||
bool m_mod_af_input_isSet;
|
bool m_mod_af_input_isSet;
|
||||||
|
|
||||||
|
qint32 pre_emphasis_on;
|
||||||
|
bool m_pre_emphasis_on_isSet;
|
||||||
|
|
||||||
|
qint32 bpf_on;
|
||||||
|
bool m_bpf_on_isSet;
|
||||||
|
|
||||||
qint32 stream_index;
|
qint32 stream_index;
|
||||||
bool m_stream_index_isSet;
|
bool m_stream_index_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user