mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Interferometer: added localDeviceIndex and play to API
This commit is contained in:
parent
62ffcde69f
commit
a85731d3f7
@ -554,6 +554,12 @@ void Interferometer::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("gain")) {
|
||||
settings.m_gain = response.getInterferometerSettings()->getGain();
|
||||
}
|
||||
if (channelSettingsKeys.contains("localDeviceIndex")) {
|
||||
settings.m_localDeviceIndex = response.getInterferometerSettings()->getLocalDeviceIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("play")) {
|
||||
settings.m_play = response.getInterferometerSettings()->getPlay() != 0;
|
||||
}
|
||||
|
||||
if (channelSettingsKeys.contains("filterChainHash"))
|
||||
{
|
||||
@ -603,6 +609,8 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
|
||||
response.getInterferometerSettings()->setLog2Decim(settings.m_log2Decim);
|
||||
response.getInterferometerSettings()->setPhase(settings.m_phase);
|
||||
response.getInterferometerSettings()->setGain(settings.m_gain);
|
||||
response.getInterferometerSettings()->setLocalDeviceIndex(settings.m_localDeviceIndex);
|
||||
response.getInterferometerSettings()->setPlay(settings.m_play ? 1 : 0);
|
||||
response.getInterferometerSettings()->setFilterChainHash(settings.m_filterChainHash);
|
||||
response.getInterferometerSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
@ -613,8 +621,8 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
|
||||
}
|
||||
|
||||
response.getInterferometerSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
// response.getInterferometerSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
// response.getInterferometerSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
response.getInterferometerSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.getInterferometerSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
|
||||
if (settings.m_spectrumGUI)
|
||||
{
|
||||
@ -754,12 +762,12 @@ void Interferometer::webapiFormatChannelSettings(
|
||||
if (channelSettingsKeys.contains("gain") || force) {
|
||||
swgInterferometerSettings->setGain(settings.m_gain);
|
||||
}
|
||||
// if (channelSettingsKeys.contains("localDeviceIndex") || force) {
|
||||
// swgInterferometerSettings->setLocalDeviceIndex(settings.m_localDeviceIndex);
|
||||
// }
|
||||
// if (channelSettingsKeys.contains("play") || force) {
|
||||
// swgInterferometerSettings->setPlay(settings.m_play ? 1 : 0);
|
||||
// }
|
||||
if (channelSettingsKeys.contains("localDeviceIndex") || force) {
|
||||
swgInterferometerSettings->setLocalDeviceIndex(settings.m_localDeviceIndex);
|
||||
}
|
||||
if (channelSettingsKeys.contains("play") || force) {
|
||||
swgInterferometerSettings->setPlay(settings.m_play ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
||||
swgInterferometerSettings->setFilterChainHash(settings.m_filterChainHash);
|
||||
}
|
||||
|
@ -8509,6 +8509,14 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "Channel B gain in centi-Bels"
|
||||
},
|
||||
"localDeviceIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "Receiving local input device set index for correlated IQ"
|
||||
},
|
||||
"play" : {
|
||||
"type" : "integer",
|
||||
"description" : "Run correlated IQ samples transfer\n * 0 - stop\n * 1 - run\n"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
@ -58960,7 +58968,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2024-05-12T00:06:46.949+02:00
|
||||
Generated 2024-05-12T21:57:44.126+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -18,6 +18,15 @@ InterferometerSettings:
|
||||
gain:
|
||||
description: Channel B gain in centi-Bels
|
||||
type: integer
|
||||
localDeviceIndex:
|
||||
description: "Receiving local input device set index for correlated IQ"
|
||||
type: integer
|
||||
play:
|
||||
type: integer
|
||||
description: >
|
||||
Run correlated IQ samples transfer
|
||||
* 0 - stop
|
||||
* 1 - run
|
||||
useReverseAPI:
|
||||
description: Synchronize with reverse API (1 for yes, 0 for no)
|
||||
type: integer
|
||||
|
@ -18,6 +18,15 @@ InterferometerSettings:
|
||||
gain:
|
||||
description: Channel B gain in centi-Bels
|
||||
type: integer
|
||||
localDeviceIndex:
|
||||
description: "Receiving local input device set index for correlated IQ"
|
||||
type: integer
|
||||
play:
|
||||
type: integer
|
||||
description: >
|
||||
Run correlated IQ samples transfer
|
||||
* 0 - stop
|
||||
* 1 - run
|
||||
useReverseAPI:
|
||||
description: Synchronize with reverse API (1 for yes, 0 for no)
|
||||
type: integer
|
||||
|
@ -8509,6 +8509,14 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "Channel B gain in centi-Bels"
|
||||
},
|
||||
"localDeviceIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "Receiving local input device set index for correlated IQ"
|
||||
},
|
||||
"play" : {
|
||||
"type" : "integer",
|
||||
"description" : "Run correlated IQ samples transfer\n * 0 - stop\n * 1 - run\n"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
@ -58960,7 +58968,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2024-05-12T00:06:46.949+02:00
|
||||
Generated 2024-05-12T21:57:44.126+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,6 +42,10 @@ SWGInterferometerSettings::SWGInterferometerSettings() {
|
||||
m_phase_isSet = false;
|
||||
gain = 0;
|
||||
m_gain_isSet = false;
|
||||
local_device_index = 0;
|
||||
m_local_device_index_isSet = false;
|
||||
play = 0;
|
||||
m_play_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
m_use_reverse_api_isSet = false;
|
||||
reverse_api_address = nullptr;
|
||||
@ -82,6 +86,10 @@ SWGInterferometerSettings::init() {
|
||||
m_phase_isSet = false;
|
||||
gain = 0;
|
||||
m_gain_isSet = false;
|
||||
local_device_index = 0;
|
||||
m_local_device_index_isSet = false;
|
||||
play = 0;
|
||||
m_play_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
m_use_reverse_api_isSet = false;
|
||||
reverse_api_address = new QString("");
|
||||
@ -114,6 +122,8 @@ SWGInterferometerSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(reverse_api_address != nullptr) {
|
||||
delete reverse_api_address;
|
||||
}
|
||||
@ -159,6 +169,10 @@ SWGInterferometerSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&gain, pJson["gain"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&local_device_index, pJson["localDeviceIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&play, pJson["play"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
|
||||
@ -214,6 +228,12 @@ SWGInterferometerSettings::asJsonObject() {
|
||||
if(m_gain_isSet){
|
||||
obj->insert("gain", QJsonValue(gain));
|
||||
}
|
||||
if(m_local_device_index_isSet){
|
||||
obj->insert("localDeviceIndex", QJsonValue(local_device_index));
|
||||
}
|
||||
if(m_play_isSet){
|
||||
obj->insert("play", QJsonValue(play));
|
||||
}
|
||||
if(m_use_reverse_api_isSet){
|
||||
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
|
||||
}
|
||||
@ -315,6 +335,26 @@ SWGInterferometerSettings::setGain(qint32 gain) {
|
||||
this->m_gain_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGInterferometerSettings::getLocalDeviceIndex() {
|
||||
return local_device_index;
|
||||
}
|
||||
void
|
||||
SWGInterferometerSettings::setLocalDeviceIndex(qint32 local_device_index) {
|
||||
this->local_device_index = local_device_index;
|
||||
this->m_local_device_index_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGInterferometerSettings::getPlay() {
|
||||
return play;
|
||||
}
|
||||
void
|
||||
SWGInterferometerSettings::setPlay(qint32 play) {
|
||||
this->play = play;
|
||||
this->m_play_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGInterferometerSettings::getUseReverseApi() {
|
||||
return use_reverse_api;
|
||||
@ -431,6 +471,12 @@ SWGInterferometerSettings::isSet(){
|
||||
if(m_gain_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_local_device_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_play_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_use_reverse_api_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -67,6 +67,12 @@ public:
|
||||
qint32 getGain();
|
||||
void setGain(qint32 gain);
|
||||
|
||||
qint32 getLocalDeviceIndex();
|
||||
void setLocalDeviceIndex(qint32 local_device_index);
|
||||
|
||||
qint32 getPlay();
|
||||
void setPlay(qint32 play);
|
||||
|
||||
qint32 getUseReverseApi();
|
||||
void setUseReverseApi(qint32 use_reverse_api);
|
||||
|
||||
@ -119,6 +125,12 @@ private:
|
||||
qint32 gain;
|
||||
bool m_gain_isSet;
|
||||
|
||||
qint32 local_device_index;
|
||||
bool m_local_device_index_isSet;
|
||||
|
||||
qint32 play;
|
||||
bool m_play_isSet;
|
||||
|
||||
qint32 use_reverse_api;
|
||||
bool m_use_reverse_api_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user