mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-07 03:58:38 -04:00
Web API: NFM demod: implemented use RTP indicator
This commit is contained in:
parent
175c3ab61e
commit
de2f47dd85
@ -568,9 +568,9 @@ int NFMDemod::webapiSettingsPutPatch(
|
||||
if (channelSettingsKeys.contains("copyAudioToUDP")) {
|
||||
settings.m_copyAudioToUDP = response.getNfmDemodSettings()->getCopyAudioToUdp() != 0;
|
||||
}
|
||||
// if (channelSettingsKeys.contains("copyAudioUseRTP")) {
|
||||
// settings.m_copyAudioUseRTP = response.getNfmDemodSettings()->getCopyAudioUseRtp() != 0;
|
||||
// }
|
||||
if (channelSettingsKeys.contains("copyAudioUseRTP")) {
|
||||
settings.m_copyAudioUseRTP = response.getNfmDemodSettings()->getCopyAudioUseRtp() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("ctcssIndex")) {
|
||||
settings.m_ctcssIndex = response.getNfmDemodSettings()->getCtcssIndex();
|
||||
}
|
||||
@ -640,7 +640,7 @@ void NFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
|
||||
response.getNfmDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
|
||||
response.getNfmDemodSettings()->setAudioSampleRate(settings.m_audioSampleRate);
|
||||
response.getNfmDemodSettings()->setCopyAudioToUdp(settings.m_copyAudioToUDP ? 1 : 0);
|
||||
// response.getNfmDemodSettings()->setCopyAudioUseRtp(settings.m_copyAudioUseRTP ? 1 : 0);
|
||||
response.getNfmDemodSettings()->setCopyAudioUseRtp(settings.m_copyAudioUseRTP ? 1 : 0);
|
||||
response.getNfmDemodSettings()->setCtcssIndex(settings.m_ctcssIndex);
|
||||
response.getNfmDemodSettings()->setCtcssOn(settings.m_ctcssOn ? 1 : 0);
|
||||
response.getNfmDemodSettings()->setDeltaSquelch(settings.m_deltaSquelch ? 1 : 0);
|
||||
|
@ -1372,6 +1372,9 @@ margin-bottom: 20px;
|
||||
"copyAudioToUDP" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"copyAudioUseRTP" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"udpAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
@ -16922,7 +16925,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-02-14T00:45:07.183+01:00
|
||||
Generated 2018-02-20T20:02:08.315+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,6 +32,8 @@ NFMDemodSettings:
|
||||
type: integer
|
||||
copyAudioToUDP:
|
||||
type: integer
|
||||
copyAudioUseRTP:
|
||||
type: integer
|
||||
udpAddress:
|
||||
type: string
|
||||
udpPort:
|
||||
|
@ -1372,6 +1372,9 @@ margin-bottom: 20px;
|
||||
"copyAudioToUDP" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"copyAudioUseRTP" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"udpAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
@ -16922,7 +16925,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-02-14T00:45:07.183+01:00
|
||||
Generated 2018-02-20T20:02:08.315+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,6 +54,8 @@ SWGNFMDemodSettings::SWGNFMDemodSettings() {
|
||||
m_audio_sample_rate_isSet = false;
|
||||
copy_audio_to_udp = 0;
|
||||
m_copy_audio_to_udp_isSet = false;
|
||||
copy_audio_use_rtp = 0;
|
||||
m_copy_audio_use_rtp_isSet = false;
|
||||
udp_address = nullptr;
|
||||
m_udp_address_isSet = false;
|
||||
udp_port = 0;
|
||||
@ -96,6 +98,8 @@ SWGNFMDemodSettings::init() {
|
||||
m_audio_sample_rate_isSet = false;
|
||||
copy_audio_to_udp = 0;
|
||||
m_copy_audio_to_udp_isSet = false;
|
||||
copy_audio_use_rtp = 0;
|
||||
m_copy_audio_use_rtp_isSet = false;
|
||||
udp_address = new QString("");
|
||||
m_udp_address_isSet = false;
|
||||
udp_port = 0;
|
||||
@ -121,6 +125,7 @@ SWGNFMDemodSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
if(udp_address != nullptr) {
|
||||
delete udp_address;
|
||||
}
|
||||
@ -168,6 +173,8 @@ SWGNFMDemodSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(©_audio_to_udp, pJson["copyAudioToUDP"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(©_audio_use_rtp, pJson["copyAudioUseRTP"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", "");
|
||||
@ -231,6 +238,9 @@ SWGNFMDemodSettings::asJsonObject() {
|
||||
if(m_copy_audio_to_udp_isSet){
|
||||
obj->insert("copyAudioToUDP", QJsonValue(copy_audio_to_udp));
|
||||
}
|
||||
if(m_copy_audio_use_rtp_isSet){
|
||||
obj->insert("copyAudioUseRTP", QJsonValue(copy_audio_use_rtp));
|
||||
}
|
||||
if(udp_address != nullptr && *udp_address != QString("")){
|
||||
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString"));
|
||||
}
|
||||
@ -377,6 +387,16 @@ SWGNFMDemodSettings::setCopyAudioToUdp(qint32 copy_audio_to_udp) {
|
||||
this->m_copy_audio_to_udp_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGNFMDemodSettings::getCopyAudioUseRtp() {
|
||||
return copy_audio_use_rtp;
|
||||
}
|
||||
void
|
||||
SWGNFMDemodSettings::setCopyAudioUseRtp(qint32 copy_audio_use_rtp) {
|
||||
this->copy_audio_use_rtp = copy_audio_use_rtp;
|
||||
this->m_copy_audio_use_rtp_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGNFMDemodSettings::getUdpAddress() {
|
||||
return udp_address;
|
||||
@ -435,6 +455,7 @@ SWGNFMDemodSettings::isSet(){
|
||||
if(m_ctcss_index_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_audio_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_copy_audio_to_udp_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_copy_audio_use_rtp_isSet){ isObjectUpdated = true; break;}
|
||||
if(udp_address != nullptr && *udp_address != QString("")){ isObjectUpdated = true; break;}
|
||||
if(m_udp_port_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_rgb_color_isSet){ isObjectUpdated = true; break;}
|
||||
|
@ -80,6 +80,9 @@ public:
|
||||
qint32 getCopyAudioToUdp();
|
||||
void setCopyAudioToUdp(qint32 copy_audio_to_udp);
|
||||
|
||||
qint32 getCopyAudioUseRtp();
|
||||
void setCopyAudioUseRtp(qint32 copy_audio_use_rtp);
|
||||
|
||||
QString* getUdpAddress();
|
||||
void setUdpAddress(QString* udp_address);
|
||||
|
||||
@ -135,6 +138,9 @@ private:
|
||||
qint32 copy_audio_to_udp;
|
||||
bool m_copy_audio_to_udp_isSet;
|
||||
|
||||
qint32 copy_audio_use_rtp;
|
||||
bool m_copy_audio_use_rtp_isSet;
|
||||
|
||||
QString* udp_address;
|
||||
bool m_udp_address_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user