mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
WDSP receiver: added RIT to the API
This commit is contained in:
parent
51870a2ae1
commit
ec4030052a
@ -632,6 +632,12 @@ void WDSPRx::webapiUpdateChannelSettings(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (channelSettingsKeys.contains("rit")) {
|
||||||
|
settings.m_rit = response.getWdspRxSettings()->getRit() != 0;
|
||||||
|
}
|
||||||
|
if (channelSettingsKeys.contains("ritFrequency")) {
|
||||||
|
settings.m_ritFrequency = response.getWdspRxSettings()->getRitFrequency();
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("spanLog2")) {
|
if (channelSettingsKeys.contains("spanLog2")) {
|
||||||
settings.m_profiles[settings.m_profileIndex].m_spanLog2 = response.getWdspRxSettings()->getSpanLog2();
|
settings.m_profiles[settings.m_profileIndex].m_spanLog2 = response.getWdspRxSettings()->getSpanLog2();
|
||||||
}
|
}
|
||||||
@ -763,6 +769,8 @@ void WDSPRx::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
|
|||||||
response.getWdspRxSettings()->getEqG()->push_back(settings.m_eqG[i]);
|
response.getWdspRxSettings()->getEqG()->push_back(settings.m_eqG[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
response.getWdspRxSettings()->setRit(settings.m_rit ? 1 : 0);
|
||||||
|
response.getWdspRxSettings()->setRitFrequency(settings.m_ritFrequency);
|
||||||
response.getWdspRxSettings()->setSpanLog2(settings.m_profiles[settings.m_profileIndex].m_spanLog2);
|
response.getWdspRxSettings()->setSpanLog2(settings.m_profiles[settings.m_profileIndex].m_spanLog2);
|
||||||
response.getWdspRxSettings()->setRfBandwidth(settings.m_profiles[settings.m_profileIndex].m_highCutoff);
|
response.getWdspRxSettings()->setRfBandwidth(settings.m_profiles[settings.m_profileIndex].m_highCutoff);
|
||||||
response.getWdspRxSettings()->setLowCutoff(settings.m_profiles[settings.m_profileIndex].m_lowCutoff);
|
response.getWdspRxSettings()->setLowCutoff(settings.m_profiles[settings.m_profileIndex].m_lowCutoff);
|
||||||
@ -1089,6 +1097,12 @@ void WDSPRx::webapiFormatChannelSettings(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (channelSettingsKeys.contains("rit")) {
|
||||||
|
swgWDSPRxSettings->setRit(settings.m_rit ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (channelSettingsKeys.contains("ritFrequency")) {
|
||||||
|
swgWDSPRxSettings->setRit(settings.m_ritFrequency);
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("spanLog2") || force) {
|
if (channelSettingsKeys.contains("spanLog2") || force) {
|
||||||
swgWDSPRxSettings->setSpanLog2(settings.m_profiles[settings.m_profileIndex].m_spanLog2);
|
swgWDSPRxSettings->setSpanLog2(settings.m_profiles[settings.m_profileIndex].m_spanLog2);
|
||||||
}
|
}
|
||||||
|
@ -17281,7 +17281,7 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"fmAFLimiter" : {
|
"fmAFLimiter" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "FM Audio level limiter (audio AGC)\n"
|
"description" : "FM Audio level limiter (audio AGC)\n * 0 - Off\n * 1 - On\n"
|
||||||
},
|
},
|
||||||
"fmAFLimiterGain" : {
|
"fmAFLimiterGain" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -17344,6 +17344,15 @@ margin-bottom: 20px;
|
|||||||
"format" : "float"
|
"format" : "float"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rit" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "RIT:\n * 0 - Off\n * 1 - On\n"
|
||||||
|
},
|
||||||
|
"ritFrequency" : {
|
||||||
|
"type" : "number",
|
||||||
|
"format" : "float",
|
||||||
|
"description" : "RIT shift frequency (Hz)"
|
||||||
|
},
|
||||||
"spanLog2" : {
|
"spanLog2" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -59432,7 +59441,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2024-07-10T22:13:04.144+02:00
|
Generated 2024-07-13T13:44:10.416+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -175,6 +175,8 @@ WDSPRxSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
description: >
|
description: >
|
||||||
FM Audio level limiter (audio AGC)
|
FM Audio level limiter (audio AGC)
|
||||||
|
* 0 - Off
|
||||||
|
* 1 - On
|
||||||
fmAFLimiterGain:
|
fmAFLimiterGain:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
@ -237,6 +239,16 @@ WDSPRxSettings:
|
|||||||
items:
|
items:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
|
rit:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
RIT:
|
||||||
|
* 0 - Off
|
||||||
|
* 1 - On
|
||||||
|
ritFrequency:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
description: RIT shift frequency (Hz)
|
||||||
spanLog2:
|
spanLog2:
|
||||||
type: integer
|
type: integer
|
||||||
rfBandwidth:
|
rfBandwidth:
|
||||||
|
@ -239,6 +239,16 @@ WDSPRxSettings:
|
|||||||
items:
|
items:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
|
rit:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
RIT:
|
||||||
|
* 0 - Off
|
||||||
|
* 1 - On
|
||||||
|
ritFrequency:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
description: RIT shift frequency (Hz)
|
||||||
spanLog2:
|
spanLog2:
|
||||||
type: integer
|
type: integer
|
||||||
rfBandwidth:
|
rfBandwidth:
|
||||||
|
@ -17281,7 +17281,7 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"fmAFLimiter" : {
|
"fmAFLimiter" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "FM Audio level limiter (audio AGC)\n"
|
"description" : "FM Audio level limiter (audio AGC)\n * 0 - Off\n * 1 - On\n"
|
||||||
},
|
},
|
||||||
"fmAFLimiterGain" : {
|
"fmAFLimiterGain" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -17344,6 +17344,15 @@ margin-bottom: 20px;
|
|||||||
"format" : "float"
|
"format" : "float"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rit" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "RIT:\n * 0 - Off\n * 1 - On\n"
|
||||||
|
},
|
||||||
|
"ritFrequency" : {
|
||||||
|
"type" : "number",
|
||||||
|
"format" : "float",
|
||||||
|
"description" : "RIT shift frequency (Hz)"
|
||||||
|
},
|
||||||
"spanLog2" : {
|
"spanLog2" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -59432,7 +59441,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2024-07-10T22:13:04.144+02:00
|
Generated 2024-07-13T13:44:10.416+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -126,6 +126,10 @@ SWGWDSPRxSettings::SWGWDSPRxSettings() {
|
|||||||
m_eq_f_isSet = false;
|
m_eq_f_isSet = false;
|
||||||
eq_g = new QList<float>();
|
eq_g = new QList<float>();
|
||||||
m_eq_g_isSet = false;
|
m_eq_g_isSet = false;
|
||||||
|
rit = 0;
|
||||||
|
m_rit_isSet = false;
|
||||||
|
rit_frequency = 0.0f;
|
||||||
|
m_rit_frequency_isSet = false;
|
||||||
span_log2 = 0;
|
span_log2 = 0;
|
||||||
m_span_log2_isSet = false;
|
m_span_log2_isSet = false;
|
||||||
rf_bandwidth = 0.0f;
|
rf_bandwidth = 0.0f;
|
||||||
@ -264,6 +268,10 @@ SWGWDSPRxSettings::init() {
|
|||||||
m_eq_f_isSet = false;
|
m_eq_f_isSet = false;
|
||||||
eq_g = new QList<float>();
|
eq_g = new QList<float>();
|
||||||
m_eq_g_isSet = false;
|
m_eq_g_isSet = false;
|
||||||
|
rit = 0;
|
||||||
|
m_rit_isSet = false;
|
||||||
|
rit_frequency = 0.0f;
|
||||||
|
m_rit_frequency_isSet = false;
|
||||||
span_log2 = 0;
|
span_log2 = 0;
|
||||||
m_span_log2_isSet = false;
|
m_span_log2_isSet = false;
|
||||||
rf_bandwidth = 0.0f;
|
rf_bandwidth = 0.0f;
|
||||||
@ -351,6 +359,8 @@ SWGWDSPRxSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -488,6 +498,10 @@ SWGWDSPRxSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
::SWGSDRangel::setValue(&eq_f, pJson["eqF"], "QList", "float");
|
::SWGSDRangel::setValue(&eq_f, pJson["eqF"], "QList", "float");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&eq_g, pJson["eqG"], "QList", "float");
|
::SWGSDRangel::setValue(&eq_g, pJson["eqG"], "QList", "float");
|
||||||
|
::SWGSDRangel::setValue(&rit, pJson["rit"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&rit_frequency, pJson["ritFrequency"], "float", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&span_log2, pJson["spanLog2"], "qint32", "");
|
::SWGSDRangel::setValue(&span_log2, pJson["spanLog2"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
|
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
|
||||||
@ -683,6 +697,12 @@ SWGWDSPRxSettings::asJsonObject() {
|
|||||||
if(eq_g && eq_g->size() > 0){
|
if(eq_g && eq_g->size() > 0){
|
||||||
toJsonArray((QList<void*>*)eq_g, obj, "eqG", "");
|
toJsonArray((QList<void*>*)eq_g, obj, "eqG", "");
|
||||||
}
|
}
|
||||||
|
if(m_rit_isSet){
|
||||||
|
obj->insert("rit", QJsonValue(rit));
|
||||||
|
}
|
||||||
|
if(m_rit_frequency_isSet){
|
||||||
|
obj->insert("ritFrequency", QJsonValue(rit_frequency));
|
||||||
|
}
|
||||||
if(m_span_log2_isSet){
|
if(m_span_log2_isSet){
|
||||||
obj->insert("spanLog2", QJsonValue(span_log2));
|
obj->insert("spanLog2", QJsonValue(span_log2));
|
||||||
}
|
}
|
||||||
@ -1225,6 +1245,26 @@ SWGWDSPRxSettings::setEqG(QList<float>* eq_g) {
|
|||||||
this->m_eq_g_isSet = true;
|
this->m_eq_g_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGWDSPRxSettings::getRit() {
|
||||||
|
return rit;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGWDSPRxSettings::setRit(qint32 rit) {
|
||||||
|
this->rit = rit;
|
||||||
|
this->m_rit_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SWGWDSPRxSettings::getRitFrequency() {
|
||||||
|
return rit_frequency;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGWDSPRxSettings::setRitFrequency(float rit_frequency) {
|
||||||
|
this->rit_frequency = rit_frequency;
|
||||||
|
this->m_rit_frequency_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGWDSPRxSettings::getSpanLog2() {
|
SWGWDSPRxSettings::getSpanLog2() {
|
||||||
return span_log2;
|
return span_log2;
|
||||||
@ -1543,6 +1583,12 @@ SWGWDSPRxSettings::isSet(){
|
|||||||
if(eq_g && (eq_g->size() > 0)){
|
if(eq_g && (eq_g->size() > 0)){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_rit_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
|
if(m_rit_frequency_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_span_log2_isSet){
|
if(m_span_log2_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -193,6 +193,12 @@ public:
|
|||||||
QList<float>* getEqG();
|
QList<float>* getEqG();
|
||||||
void setEqG(QList<float>* eq_g);
|
void setEqG(QList<float>* eq_g);
|
||||||
|
|
||||||
|
qint32 getRit();
|
||||||
|
void setRit(qint32 rit);
|
||||||
|
|
||||||
|
float getRitFrequency();
|
||||||
|
void setRitFrequency(float rit_frequency);
|
||||||
|
|
||||||
qint32 getSpanLog2();
|
qint32 getSpanLog2();
|
||||||
void setSpanLog2(qint32 span_log2);
|
void setSpanLog2(qint32 span_log2);
|
||||||
|
|
||||||
@ -392,6 +398,12 @@ private:
|
|||||||
QList<float>* eq_g;
|
QList<float>* eq_g;
|
||||||
bool m_eq_g_isSet;
|
bool m_eq_g_isSet;
|
||||||
|
|
||||||
|
qint32 rit;
|
||||||
|
bool m_rit_isSet;
|
||||||
|
|
||||||
|
float rit_frequency;
|
||||||
|
bool m_rit_frequency_isSet;
|
||||||
|
|
||||||
qint32 span_log2;
|
qint32 span_log2;
|
||||||
bool m_span_log2_isSet;
|
bool m_span_log2_isSet;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user