mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 08:04:49 -05:00
FCD: Decimation and Fc Pos REST API implementations
This commit is contained in:
parent
b68eceb635
commit
26aab263e0
@ -919,6 +919,12 @@ int FCDProInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("gain6Index")) {
|
||||
settings.m_gain6Index = response.getFcdProSettings()->getGain6Index();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("log2Decim")) {
|
||||
settings.m_log2Decim = response.getFcdProSettings()->getLog2Decim();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fcPos")) {
|
||||
settings.m_fcPos = (FCDProSettings::fcPos_t) response.getFcdProSettings()->getFcPos();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("rcFilterIndex")) {
|
||||
settings.m_rcFilterIndex = response.getFcdProSettings()->getRcFilterIndex();
|
||||
}
|
||||
@ -972,6 +978,8 @@ void FCDProInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
|
||||
response.getFcdProSettings()->setGain4Index(settings.m_gain4Index);
|
||||
response.getFcdProSettings()->setGain5Index(settings.m_gain5Index);
|
||||
response.getFcdProSettings()->setGain6Index(settings.m_gain6Index);
|
||||
response.getFcdProSettings()->setLog2Decim(settings.m_log2Decim);
|
||||
response.getFcdProSettings()->setFcPos((int) settings.m_fcPos);
|
||||
response.getFcdProSettings()->setRcFilterIndex(settings.m_rcFilterIndex);
|
||||
response.getFcdProSettings()->setIfFilterIndex(settings.m_ifFilterIndex);
|
||||
response.getFcdProSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
@ -1044,6 +1052,12 @@ void FCDProInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
|
||||
if (deviceSettingsKeys.contains("gain6Index") || force) {
|
||||
swgFCDProSettings->setGain6Index(settings.m_gain6Index);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("log2Decim") || force) {
|
||||
swgFCDProSettings->setLog2Decim(settings.m_log2Decim);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fcPos") || force) {
|
||||
swgFCDProSettings->setFcPos(settings.m_fcPos);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("rcFilterIndex") || force) {
|
||||
swgFCDProSettings->setRcFilterIndex(settings.m_rcFilterIndex);
|
||||
}
|
||||
|
@ -601,6 +601,12 @@ int FCDProPlusInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("centerFrequency")) {
|
||||
settings.m_centerFrequency = response.getFcdProPlusSettings()->getCenterFrequency();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("log2Decim")) {
|
||||
settings.m_log2Decim = response.getFcdProPlusSettings()->getLog2Decim();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fcPos")) {
|
||||
settings.m_fcPos = (FCDProPlusSettings::fcPos_t) response.getFcdProPlusSettings()->getFcPos();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("rangeLow")) {
|
||||
settings.m_rangeLow = response.getFcdProPlusSettings()->getRangeLow() != 0;
|
||||
}
|
||||
@ -657,6 +663,8 @@ int FCDProPlusInput::webapiSettingsPutPatch(
|
||||
void FCDProPlusInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const FCDProPlusSettings& settings)
|
||||
{
|
||||
response.getFcdProPlusSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||
response.getFcdProPlusSettings()->setLog2Decim(settings.m_log2Decim);
|
||||
response.getFcdProPlusSettings()->setFcPos((int) settings.m_fcPos);
|
||||
response.getFcdProPlusSettings()->setRangeLow(settings.m_rangeLow ? 1 : 0);
|
||||
response.getFcdProPlusSettings()->setLnaGain(settings.m_lnaGain ? 1 : 0);
|
||||
response.getFcdProPlusSettings()->setMixGain(settings.m_mixGain ? 1 : 0);
|
||||
@ -690,6 +698,12 @@ void FCDProPlusInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKe
|
||||
if (deviceSettingsKeys.contains("centerFrequency") || force) {
|
||||
swgFCDProPlusSettings->setCenterFrequency(settings.m_centerFrequency);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("log2Decim") || force) {
|
||||
swgFCDProPlusSettings->setLog2Decim(settings.m_log2Decim);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("fcPos") || force) {
|
||||
swgFCDProPlusSettings->setFcPos((int) settings.m_fcPos);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("rangeLow") || force) {
|
||||
swgFCDProPlusSettings->setRangeLow(settings.m_rangeLow ? 1 : 0);
|
||||
}
|
||||
|
@ -2344,6 +2344,12 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"log2Decim" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fcPos" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rangeLow" : {
|
||||
"type" : "integer",
|
||||
"description" : "Range select (1 if low else 0)"
|
||||
@ -2448,6 +2454,12 @@ margin-bottom: 20px;
|
||||
"gain6Index" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2Decim" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fcPos" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
@ -24088,7 +24100,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2019-01-02T09:02:53.799+01:00
|
||||
Generated 2019-01-05T09:23:57.596+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,6 +38,10 @@ FCDProSettings:
|
||||
type: integer
|
||||
gain6Index:
|
||||
type: integer
|
||||
log2Decim:
|
||||
type: integer
|
||||
fcPos:
|
||||
type: integer
|
||||
dcBlock:
|
||||
type: integer
|
||||
iqCorrection:
|
||||
@ -46,7 +50,7 @@ FCDProSettings:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
format: int64
|
||||
fileRecordName:
|
||||
type: string
|
||||
|
||||
|
@ -4,6 +4,10 @@ FCDProPlusSettings:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
log2Decim:
|
||||
type: integer
|
||||
fcPos:
|
||||
type: integer
|
||||
rangeLow:
|
||||
description: Range select (1 if low else 0)
|
||||
type: integer
|
||||
@ -32,6 +36,6 @@ FCDProPlusSettings:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
format: int64
|
||||
fileRecordName:
|
||||
type: string
|
||||
|
@ -38,6 +38,10 @@ FCDProSettings:
|
||||
type: integer
|
||||
gain6Index:
|
||||
type: integer
|
||||
log2Decim:
|
||||
type: integer
|
||||
fcPos:
|
||||
type: integer
|
||||
dcBlock:
|
||||
type: integer
|
||||
iqCorrection:
|
||||
@ -46,7 +50,7 @@ FCDProSettings:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
format: int64
|
||||
fileRecordName:
|
||||
type: string
|
||||
|
||||
|
@ -4,6 +4,10 @@ FCDProPlusSettings:
|
||||
centerFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
log2Decim:
|
||||
type: integer
|
||||
fcPos:
|
||||
type: integer
|
||||
rangeLow:
|
||||
description: Range select (1 if low else 0)
|
||||
type: integer
|
||||
@ -32,6 +36,6 @@ FCDProPlusSettings:
|
||||
type: integer
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
format: int64
|
||||
fileRecordName:
|
||||
type: string
|
||||
|
@ -2344,6 +2344,12 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"log2Decim" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fcPos" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rangeLow" : {
|
||||
"type" : "integer",
|
||||
"description" : "Range select (1 if low else 0)"
|
||||
@ -2448,6 +2454,12 @@ margin-bottom: 20px;
|
||||
"gain6Index" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"log2Decim" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"fcPos" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"dcBlock" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
@ -24088,7 +24100,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2019-01-02T09:02:53.799+01:00
|
||||
Generated 2019-01-05T09:23:57.596+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,6 +30,10 @@ SWGFCDProPlusSettings::SWGFCDProPlusSettings(QString* json) {
|
||||
SWGFCDProPlusSettings::SWGFCDProPlusSettings() {
|
||||
center_frequency = 0L;
|
||||
m_center_frequency_isSet = false;
|
||||
log2_decim = 0;
|
||||
m_log2_decim_isSet = false;
|
||||
fc_pos = 0;
|
||||
m_fc_pos_isSet = false;
|
||||
range_low = 0;
|
||||
m_range_low_isSet = false;
|
||||
lna_gain = 0;
|
||||
@ -66,6 +70,10 @@ void
|
||||
SWGFCDProPlusSettings::init() {
|
||||
center_frequency = 0L;
|
||||
m_center_frequency_isSet = false;
|
||||
log2_decim = 0;
|
||||
m_log2_decim_isSet = false;
|
||||
fc_pos = 0;
|
||||
m_fc_pos_isSet = false;
|
||||
range_low = 0;
|
||||
m_range_low_isSet = false;
|
||||
lna_gain = 0;
|
||||
@ -109,6 +117,8 @@ SWGFCDProPlusSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(file_record_name != nullptr) {
|
||||
delete file_record_name;
|
||||
}
|
||||
@ -127,6 +137,10 @@ void
|
||||
SWGFCDProPlusSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
||||
|
||||
::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&range_low, pJson["rangeLow"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lna_gain, pJson["lnaGain"], "qint32", "");
|
||||
@ -172,6 +186,12 @@ SWGFCDProPlusSettings::asJsonObject() {
|
||||
if(m_center_frequency_isSet){
|
||||
obj->insert("centerFrequency", QJsonValue(center_frequency));
|
||||
}
|
||||
if(m_log2_decim_isSet){
|
||||
obj->insert("log2Decim", QJsonValue(log2_decim));
|
||||
}
|
||||
if(m_fc_pos_isSet){
|
||||
obj->insert("fcPos", QJsonValue(fc_pos));
|
||||
}
|
||||
if(m_range_low_isSet){
|
||||
obj->insert("rangeLow", QJsonValue(range_low));
|
||||
}
|
||||
@ -225,6 +245,26 @@ SWGFCDProPlusSettings::setCenterFrequency(qint64 center_frequency) {
|
||||
this->m_center_frequency_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFCDProPlusSettings::getLog2Decim() {
|
||||
return log2_decim;
|
||||
}
|
||||
void
|
||||
SWGFCDProPlusSettings::setLog2Decim(qint32 log2_decim) {
|
||||
this->log2_decim = log2_decim;
|
||||
this->m_log2_decim_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFCDProPlusSettings::getFcPos() {
|
||||
return fc_pos;
|
||||
}
|
||||
void
|
||||
SWGFCDProPlusSettings::setFcPos(qint32 fc_pos) {
|
||||
this->fc_pos = fc_pos;
|
||||
this->m_fc_pos_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFCDProPlusSettings::getRangeLow() {
|
||||
return range_low;
|
||||
@ -361,6 +401,8 @@ SWGFCDProPlusSettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_log2_decim_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_fc_pos_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_range_low_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_lna_gain_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_mix_gain_isSet){ isObjectUpdated = true; break;}
|
||||
|
@ -45,6 +45,12 @@ public:
|
||||
qint64 getCenterFrequency();
|
||||
void setCenterFrequency(qint64 center_frequency);
|
||||
|
||||
qint32 getLog2Decim();
|
||||
void setLog2Decim(qint32 log2_decim);
|
||||
|
||||
qint32 getFcPos();
|
||||
void setFcPos(qint32 fc_pos);
|
||||
|
||||
qint32 getRangeLow();
|
||||
void setRangeLow(qint32 range_low);
|
||||
|
||||
@ -91,6 +97,12 @@ private:
|
||||
qint64 center_frequency;
|
||||
bool m_center_frequency_isSet;
|
||||
|
||||
qint32 log2_decim;
|
||||
bool m_log2_decim_isSet;
|
||||
|
||||
qint32 fc_pos;
|
||||
bool m_fc_pos_isSet;
|
||||
|
||||
qint32 range_low;
|
||||
bool m_range_low_isSet;
|
||||
|
||||
|
@ -64,6 +64,10 @@ SWGFCDProSettings::SWGFCDProSettings() {
|
||||
m_gain5_index_isSet = false;
|
||||
gain6_index = 0;
|
||||
m_gain6_index_isSet = false;
|
||||
log2_decim = 0;
|
||||
m_log2_decim_isSet = false;
|
||||
fc_pos = 0;
|
||||
m_fc_pos_isSet = false;
|
||||
dc_block = 0;
|
||||
m_dc_block_isSet = false;
|
||||
iq_correction = 0;
|
||||
@ -118,6 +122,10 @@ SWGFCDProSettings::init() {
|
||||
m_gain5_index_isSet = false;
|
||||
gain6_index = 0;
|
||||
m_gain6_index_isSet = false;
|
||||
log2_decim = 0;
|
||||
m_log2_decim_isSet = false;
|
||||
fc_pos = 0;
|
||||
m_fc_pos_isSet = false;
|
||||
dc_block = 0;
|
||||
m_dc_block_isSet = false;
|
||||
iq_correction = 0;
|
||||
@ -151,6 +159,8 @@ SWGFCDProSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -206,6 +216,10 @@ SWGFCDProSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&gain6_index, pJson["gain6Index"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", "");
|
||||
@ -286,6 +300,12 @@ SWGFCDProSettings::asJsonObject() {
|
||||
if(m_gain6_index_isSet){
|
||||
obj->insert("gain6Index", QJsonValue(gain6_index));
|
||||
}
|
||||
if(m_log2_decim_isSet){
|
||||
obj->insert("log2Decim", QJsonValue(log2_decim));
|
||||
}
|
||||
if(m_fc_pos_isSet){
|
||||
obj->insert("fcPos", QJsonValue(fc_pos));
|
||||
}
|
||||
if(m_dc_block_isSet){
|
||||
obj->insert("dcBlock", QJsonValue(dc_block));
|
||||
}
|
||||
@ -485,6 +505,26 @@ SWGFCDProSettings::setGain6Index(qint32 gain6_index) {
|
||||
this->m_gain6_index_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFCDProSettings::getLog2Decim() {
|
||||
return log2_decim;
|
||||
}
|
||||
void
|
||||
SWGFCDProSettings::setLog2Decim(qint32 log2_decim) {
|
||||
this->log2_decim = log2_decim;
|
||||
this->m_log2_decim_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFCDProSettings::getFcPos() {
|
||||
return fc_pos;
|
||||
}
|
||||
void
|
||||
SWGFCDProSettings::setFcPos(qint32 fc_pos) {
|
||||
this->fc_pos = fc_pos;
|
||||
this->m_fc_pos_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFCDProSettings::getDcBlock() {
|
||||
return dc_block;
|
||||
@ -558,6 +598,8 @@ SWGFCDProSettings::isSet(){
|
||||
if(m_if_filter_index_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_gain5_index_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_gain6_index_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_log2_decim_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_fc_pos_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_dc_block_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_iq_correction_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_transverter_mode_isSet){ isObjectUpdated = true; break;}
|
||||
|
@ -96,6 +96,12 @@ public:
|
||||
qint32 getGain6Index();
|
||||
void setGain6Index(qint32 gain6_index);
|
||||
|
||||
qint32 getLog2Decim();
|
||||
void setLog2Decim(qint32 log2_decim);
|
||||
|
||||
qint32 getFcPos();
|
||||
void setFcPos(qint32 fc_pos);
|
||||
|
||||
qint32 getDcBlock();
|
||||
void setDcBlock(qint32 dc_block);
|
||||
|
||||
@ -169,6 +175,12 @@ private:
|
||||
qint32 gain6_index;
|
||||
bool m_gain6_index_isSet;
|
||||
|
||||
qint32 log2_decim;
|
||||
bool m_log2_decim_isSet;
|
||||
|
||||
qint32 fc_pos;
|
||||
bool m_fc_pos_isSet;
|
||||
|
||||
qint32 dc_block;
|
||||
bool m_dc_block_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user