mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 13:47:50 -04:00
Add loOffset to API
This commit is contained in:
parent
35380d4f36
commit
636c014427
@ -951,6 +951,9 @@ void USRPOutput::webapiUpdateDeviceSettings(
|
|||||||
if (deviceSettingsKeys.contains("devSampleRate")) {
|
if (deviceSettingsKeys.contains("devSampleRate")) {
|
||||||
settings.m_devSampleRate = response.getUsrpOutputSettings()->getDevSampleRate();
|
settings.m_devSampleRate = response.getUsrpOutputSettings()->getDevSampleRate();
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("loOffset")) {
|
||||||
|
settings.m_loOffset = response.getUsrpOutputSettings()->getLoOffset();
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("clockSource")) {
|
if (deviceSettingsKeys.contains("clockSource")) {
|
||||||
settings.m_clockSource = *response.getUsrpOutputSettings()->getClockSource();
|
settings.m_clockSource = *response.getUsrpOutputSettings()->getClockSource();
|
||||||
}
|
}
|
||||||
@ -998,6 +1001,7 @@ void USRPOutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& resp
|
|||||||
response.getUsrpOutputSettings()->setAntennaPath(new QString(settings.m_antennaPath));
|
response.getUsrpOutputSettings()->setAntennaPath(new QString(settings.m_antennaPath));
|
||||||
response.getUsrpOutputSettings()->setCenterFrequency(settings.m_centerFrequency);
|
response.getUsrpOutputSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||||
response.getUsrpOutputSettings()->setDevSampleRate(settings.m_devSampleRate);
|
response.getUsrpOutputSettings()->setDevSampleRate(settings.m_devSampleRate);
|
||||||
|
response.getUsrpOutputSettings()->setLoOffset(settings.m_loOffset);
|
||||||
response.getUsrpOutputSettings()->setClockSource(new QString(settings.m_clockSource));
|
response.getUsrpOutputSettings()->setClockSource(new QString(settings.m_clockSource));
|
||||||
response.getUsrpOutputSettings()->setGain(settings.m_gain);
|
response.getUsrpOutputSettings()->setGain(settings.m_gain);
|
||||||
response.getUsrpOutputSettings()->setLog2SoftInterp(settings.m_log2SoftInterp);
|
response.getUsrpOutputSettings()->setLog2SoftInterp(settings.m_log2SoftInterp);
|
||||||
@ -1083,6 +1087,9 @@ void USRPOutput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, c
|
|||||||
if (deviceSettingsKeys.contains("devSampleRate") || force) {
|
if (deviceSettingsKeys.contains("devSampleRate") || force) {
|
||||||
swgUsrpOutputSettings->setDevSampleRate(settings.m_devSampleRate);
|
swgUsrpOutputSettings->setDevSampleRate(settings.m_devSampleRate);
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("loOffset") || force) {
|
||||||
|
swgUsrpOutputSettings->setLoOffset(settings.m_loOffset);
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("clockSource") || force) {
|
if (deviceSettingsKeys.contains("clockSource") || force) {
|
||||||
swgUsrpOutputSettings->setClockSource(new QString(settings.m_clockSource));
|
swgUsrpOutputSettings->setClockSource(new QString(settings.m_clockSource));
|
||||||
}
|
}
|
||||||
|
@ -1025,6 +1025,9 @@ void USRPInput::webapiUpdateDeviceSettings(
|
|||||||
if (deviceSettingsKeys.contains("centerFrequency")) {
|
if (deviceSettingsKeys.contains("centerFrequency")) {
|
||||||
settings.m_centerFrequency = response.getUsrpInputSettings()->getCenterFrequency();
|
settings.m_centerFrequency = response.getUsrpInputSettings()->getCenterFrequency();
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("loOffset")) {
|
||||||
|
settings.m_loOffset = response.getUsrpInputSettings()->getLoOffset();
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("dcBlock")) {
|
if (deviceSettingsKeys.contains("dcBlock")) {
|
||||||
settings.m_dcBlock = response.getUsrpInputSettings()->getDcBlock() != 0;
|
settings.m_dcBlock = response.getUsrpInputSettings()->getDcBlock() != 0;
|
||||||
}
|
}
|
||||||
@ -1075,6 +1078,7 @@ void USRPInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& respo
|
|||||||
response.getUsrpInputSettings()->setCenterFrequency(settings.m_centerFrequency);
|
response.getUsrpInputSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||||
response.getUsrpInputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
response.getUsrpInputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||||
response.getUsrpInputSettings()->setDevSampleRate(settings.m_devSampleRate);
|
response.getUsrpInputSettings()->setDevSampleRate(settings.m_devSampleRate);
|
||||||
|
response.getUsrpInputSettings()->setLoOffset(settings.m_loOffset);
|
||||||
response.getUsrpInputSettings()->setClockSource(new QString(settings.m_clockSource));
|
response.getUsrpInputSettings()->setClockSource(new QString(settings.m_clockSource));
|
||||||
response.getUsrpInputSettings()->setGain(settings.m_gain);
|
response.getUsrpInputSettings()->setGain(settings.m_gain);
|
||||||
response.getUsrpInputSettings()->setGainMode((int) settings.m_gainMode);
|
response.getUsrpInputSettings()->setGainMode((int) settings.m_gainMode);
|
||||||
@ -1171,6 +1175,9 @@ void USRPInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, co
|
|||||||
if (deviceSettingsKeys.contains("centerFrequency") || force) {
|
if (deviceSettingsKeys.contains("centerFrequency") || force) {
|
||||||
swgUsrpInputSettings->setCenterFrequency(settings.m_centerFrequency);
|
swgUsrpInputSettings->setCenterFrequency(settings.m_centerFrequency);
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("loOffset") || force) {
|
||||||
|
swgUsrpInputSettings->setLoOffset(settings.m_loOffset);
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("dcBlock") || force) {
|
if (deviceSettingsKeys.contains("dcBlock") || force) {
|
||||||
swgUsrpInputSettings->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
swgUsrpInputSettings->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@ -7583,6 +7583,9 @@ margin-bottom: 20px;
|
|||||||
"devSampleRate" : {
|
"devSampleRate" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
|
"loOffset" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"dcBlock" : {
|
"dcBlock" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -7659,6 +7662,9 @@ margin-bottom: 20px;
|
|||||||
"devSampleRate" : {
|
"devSampleRate" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
|
"loOffset" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"log2SoftInterp" : {
|
"log2SoftInterp" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -39969,7 +39975,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2020-10-11T08:49:12.690+02:00
|
Generated 2020-10-25T21:28:04.207+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,8 @@ USRPInputSettings:
|
|||||||
format: int64
|
format: int64
|
||||||
devSampleRate:
|
devSampleRate:
|
||||||
type: integer
|
type: integer
|
||||||
|
loOffset:
|
||||||
|
type: integer
|
||||||
dcBlock:
|
dcBlock:
|
||||||
type: integer
|
type: integer
|
||||||
iqCorrection:
|
iqCorrection:
|
||||||
@ -46,6 +48,8 @@ USRPOutputSettings:
|
|||||||
format: int64
|
format: int64
|
||||||
devSampleRate:
|
devSampleRate:
|
||||||
type: integer
|
type: integer
|
||||||
|
loOffset:
|
||||||
|
type: integer
|
||||||
log2SoftInterp:
|
log2SoftInterp:
|
||||||
type: integer
|
type: integer
|
||||||
lpfBW:
|
lpfBW:
|
||||||
|
@ -7583,6 +7583,9 @@ margin-bottom: 20px;
|
|||||||
"devSampleRate" : {
|
"devSampleRate" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
|
"loOffset" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"dcBlock" : {
|
"dcBlock" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -7659,6 +7662,9 @@ margin-bottom: 20px;
|
|||||||
"devSampleRate" : {
|
"devSampleRate" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
|
"loOffset" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"log2SoftInterp" : {
|
"log2SoftInterp" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -39969,7 +39975,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2020-10-11T08:49:12.690+02:00
|
Generated 2020-10-25T21:28:04.207+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,6 +32,8 @@ SWGUSRPInputSettings::SWGUSRPInputSettings() {
|
|||||||
m_center_frequency_isSet = false;
|
m_center_frequency_isSet = false;
|
||||||
dev_sample_rate = 0;
|
dev_sample_rate = 0;
|
||||||
m_dev_sample_rate_isSet = false;
|
m_dev_sample_rate_isSet = false;
|
||||||
|
lo_offset = 0;
|
||||||
|
m_lo_offset_isSet = false;
|
||||||
dc_block = 0;
|
dc_block = 0;
|
||||||
m_dc_block_isSet = false;
|
m_dc_block_isSet = false;
|
||||||
iq_correction = 0;
|
iq_correction = 0;
|
||||||
@ -72,6 +74,8 @@ SWGUSRPInputSettings::init() {
|
|||||||
m_center_frequency_isSet = false;
|
m_center_frequency_isSet = false;
|
||||||
dev_sample_rate = 0;
|
dev_sample_rate = 0;
|
||||||
m_dev_sample_rate_isSet = false;
|
m_dev_sample_rate_isSet = false;
|
||||||
|
lo_offset = 0;
|
||||||
|
m_lo_offset_isSet = false;
|
||||||
dc_block = 0;
|
dc_block = 0;
|
||||||
m_dc_block_isSet = false;
|
m_dc_block_isSet = false;
|
||||||
iq_correction = 0;
|
iq_correction = 0;
|
||||||
@ -110,6 +114,7 @@ SWGUSRPInputSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(antenna_path != nullptr) {
|
if(antenna_path != nullptr) {
|
||||||
delete antenna_path;
|
delete antenna_path;
|
||||||
}
|
}
|
||||||
@ -143,6 +148,8 @@ SWGUSRPInputSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&dev_sample_rate, pJson["devSampleRate"], "qint32", "");
|
::SWGSDRangel::setValue(&dev_sample_rate, pJson["devSampleRate"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&lo_offset, pJson["loOffset"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", "");
|
::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", "");
|
::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", "");
|
||||||
@ -193,6 +200,9 @@ SWGUSRPInputSettings::asJsonObject() {
|
|||||||
if(m_dev_sample_rate_isSet){
|
if(m_dev_sample_rate_isSet){
|
||||||
obj->insert("devSampleRate", QJsonValue(dev_sample_rate));
|
obj->insert("devSampleRate", QJsonValue(dev_sample_rate));
|
||||||
}
|
}
|
||||||
|
if(m_lo_offset_isSet){
|
||||||
|
obj->insert("loOffset", QJsonValue(lo_offset));
|
||||||
|
}
|
||||||
if(m_dc_block_isSet){
|
if(m_dc_block_isSet){
|
||||||
obj->insert("dcBlock", QJsonValue(dc_block));
|
obj->insert("dcBlock", QJsonValue(dc_block));
|
||||||
}
|
}
|
||||||
@ -259,6 +269,16 @@ SWGUSRPInputSettings::setDevSampleRate(qint32 dev_sample_rate) {
|
|||||||
this->m_dev_sample_rate_isSet = true;
|
this->m_dev_sample_rate_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGUSRPInputSettings::getLoOffset() {
|
||||||
|
return lo_offset;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGUSRPInputSettings::setLoOffset(qint32 lo_offset) {
|
||||||
|
this->lo_offset = lo_offset;
|
||||||
|
this->m_lo_offset_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGUSRPInputSettings::getDcBlock() {
|
SWGUSRPInputSettings::getDcBlock() {
|
||||||
return dc_block;
|
return dc_block;
|
||||||
@ -410,6 +430,9 @@ SWGUSRPInputSettings::isSet(){
|
|||||||
if(m_dev_sample_rate_isSet){
|
if(m_dev_sample_rate_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_lo_offset_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_dc_block_isSet){
|
if(m_dc_block_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,9 @@ public:
|
|||||||
qint32 getDevSampleRate();
|
qint32 getDevSampleRate();
|
||||||
void setDevSampleRate(qint32 dev_sample_rate);
|
void setDevSampleRate(qint32 dev_sample_rate);
|
||||||
|
|
||||||
|
qint32 getLoOffset();
|
||||||
|
void setLoOffset(qint32 lo_offset);
|
||||||
|
|
||||||
qint32 getDcBlock();
|
qint32 getDcBlock();
|
||||||
void setDcBlock(qint32 dc_block);
|
void setDcBlock(qint32 dc_block);
|
||||||
|
|
||||||
@ -100,6 +103,9 @@ private:
|
|||||||
qint32 dev_sample_rate;
|
qint32 dev_sample_rate;
|
||||||
bool m_dev_sample_rate_isSet;
|
bool m_dev_sample_rate_isSet;
|
||||||
|
|
||||||
|
qint32 lo_offset;
|
||||||
|
bool m_lo_offset_isSet;
|
||||||
|
|
||||||
qint32 dc_block;
|
qint32 dc_block;
|
||||||
bool m_dc_block_isSet;
|
bool m_dc_block_isSet;
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ SWGUSRPOutputSettings::SWGUSRPOutputSettings() {
|
|||||||
m_center_frequency_isSet = false;
|
m_center_frequency_isSet = false;
|
||||||
dev_sample_rate = 0;
|
dev_sample_rate = 0;
|
||||||
m_dev_sample_rate_isSet = false;
|
m_dev_sample_rate_isSet = false;
|
||||||
|
lo_offset = 0;
|
||||||
|
m_lo_offset_isSet = false;
|
||||||
log2_soft_interp = 0;
|
log2_soft_interp = 0;
|
||||||
m_log2_soft_interp_isSet = false;
|
m_log2_soft_interp_isSet = false;
|
||||||
lpf_bw = 0;
|
lpf_bw = 0;
|
||||||
@ -66,6 +68,8 @@ SWGUSRPOutputSettings::init() {
|
|||||||
m_center_frequency_isSet = false;
|
m_center_frequency_isSet = false;
|
||||||
dev_sample_rate = 0;
|
dev_sample_rate = 0;
|
||||||
m_dev_sample_rate_isSet = false;
|
m_dev_sample_rate_isSet = false;
|
||||||
|
lo_offset = 0;
|
||||||
|
m_lo_offset_isSet = false;
|
||||||
log2_soft_interp = 0;
|
log2_soft_interp = 0;
|
||||||
m_log2_soft_interp_isSet = false;
|
m_log2_soft_interp_isSet = false;
|
||||||
lpf_bw = 0;
|
lpf_bw = 0;
|
||||||
@ -97,6 +101,7 @@ SWGUSRPOutputSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(antenna_path != nullptr) {
|
if(antenna_path != nullptr) {
|
||||||
delete antenna_path;
|
delete antenna_path;
|
||||||
}
|
}
|
||||||
@ -128,6 +133,8 @@ SWGUSRPOutputSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&dev_sample_rate, pJson["devSampleRate"], "qint32", "");
|
::SWGSDRangel::setValue(&dev_sample_rate, pJson["devSampleRate"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&lo_offset, pJson["loOffset"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&log2_soft_interp, pJson["log2SoftInterp"], "qint32", "");
|
::SWGSDRangel::setValue(&log2_soft_interp, pJson["log2SoftInterp"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&lpf_bw, pJson["lpfBW"], "qint32", "");
|
::SWGSDRangel::setValue(&lpf_bw, pJson["lpfBW"], "qint32", "");
|
||||||
@ -172,6 +179,9 @@ SWGUSRPOutputSettings::asJsonObject() {
|
|||||||
if(m_dev_sample_rate_isSet){
|
if(m_dev_sample_rate_isSet){
|
||||||
obj->insert("devSampleRate", QJsonValue(dev_sample_rate));
|
obj->insert("devSampleRate", QJsonValue(dev_sample_rate));
|
||||||
}
|
}
|
||||||
|
if(m_lo_offset_isSet){
|
||||||
|
obj->insert("loOffset", QJsonValue(lo_offset));
|
||||||
|
}
|
||||||
if(m_log2_soft_interp_isSet){
|
if(m_log2_soft_interp_isSet){
|
||||||
obj->insert("log2SoftInterp", QJsonValue(log2_soft_interp));
|
obj->insert("log2SoftInterp", QJsonValue(log2_soft_interp));
|
||||||
}
|
}
|
||||||
@ -229,6 +239,16 @@ SWGUSRPOutputSettings::setDevSampleRate(qint32 dev_sample_rate) {
|
|||||||
this->m_dev_sample_rate_isSet = true;
|
this->m_dev_sample_rate_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGUSRPOutputSettings::getLoOffset() {
|
||||||
|
return lo_offset;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGUSRPOutputSettings::setLoOffset(qint32 lo_offset) {
|
||||||
|
this->lo_offset = lo_offset;
|
||||||
|
this->m_lo_offset_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGUSRPOutputSettings::getLog2SoftInterp() {
|
SWGUSRPOutputSettings::getLog2SoftInterp() {
|
||||||
return log2_soft_interp;
|
return log2_soft_interp;
|
||||||
@ -350,6 +370,9 @@ SWGUSRPOutputSettings::isSet(){
|
|||||||
if(m_dev_sample_rate_isSet){
|
if(m_dev_sample_rate_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_lo_offset_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_log2_soft_interp_isSet){
|
if(m_log2_soft_interp_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,9 @@ public:
|
|||||||
qint32 getDevSampleRate();
|
qint32 getDevSampleRate();
|
||||||
void setDevSampleRate(qint32 dev_sample_rate);
|
void setDevSampleRate(qint32 dev_sample_rate);
|
||||||
|
|
||||||
|
qint32 getLoOffset();
|
||||||
|
void setLoOffset(qint32 lo_offset);
|
||||||
|
|
||||||
qint32 getLog2SoftInterp();
|
qint32 getLog2SoftInterp();
|
||||||
void setLog2SoftInterp(qint32 log2_soft_interp);
|
void setLog2SoftInterp(qint32 log2_soft_interp);
|
||||||
|
|
||||||
@ -91,6 +94,9 @@ private:
|
|||||||
qint32 dev_sample_rate;
|
qint32 dev_sample_rate;
|
||||||
bool m_dev_sample_rate_isSet;
|
bool m_dev_sample_rate_isSet;
|
||||||
|
|
||||||
|
qint32 lo_offset;
|
||||||
|
bool m_lo_offset_isSet;
|
||||||
|
|
||||||
qint32 log2_soft_interp;
|
qint32 log2_soft_interp;
|
||||||
bool m_log2_soft_interp_isSet;
|
bool m_log2_soft_interp_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user