mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-03 18:18:31 -04:00
RTL-SDR: added RF bandwidth setting in web API
This commit is contained in:
parent
9f88ea6199
commit
a793a74dd2
plugins/samplesource/rtlsdr
sdrbase/resources
swagger/sdrangel
@ -604,6 +604,9 @@ int RTLSDRInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("transverterMode")) {
|
||||
settings.m_transverterMode = response.getRtlSdrSettings()->getTransverterMode() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("rfBandwidth")) {
|
||||
settings.m_rfBandwidth = response.getRtlSdrSettings()->getRfBandwidth() != 0;
|
||||
}
|
||||
|
||||
MsgConfigureRTLSDR *msg = MsgConfigureRTLSDR::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
@ -633,6 +636,7 @@ void RTLSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
|
||||
response.getRtlSdrSettings()->setNoModMode(settings.m_noModMode ? 1 : 0);
|
||||
response.getRtlSdrSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
|
||||
response.getRtlSdrSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
||||
response.getRtlSdrSettings()->setRfBandwidth(settings.m_rfBandwidth);
|
||||
}
|
||||
|
||||
int RTLSDRInput::webapiRunGet(
|
||||
|
@ -1593,6 +1593,9 @@ margin-bottom: 20px;
|
||||
"transverterDeltaFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"rfBandwidth" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "RTLSDR"
|
||||
@ -16906,7 +16909,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-01-07T01:23:55.663+01:00
|
||||
Generated 2018-01-16T19:54:59.982+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,4 +29,6 @@ RtlSdrSettings:
|
||||
transverterDeltaFrequency:
|
||||
type: integer
|
||||
format: int64
|
||||
rfBandwidth:
|
||||
type: integer
|
||||
|
@ -1593,6 +1593,9 @@ margin-bottom: 20px;
|
||||
"transverterDeltaFrequency" : {
|
||||
"type" : "integer",
|
||||
"format" : "int64"
|
||||
},
|
||||
"rfBandwidth" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "RTLSDR"
|
||||
@ -16906,7 +16909,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-01-07T01:23:55.663+01:00
|
||||
Generated 2018-01-16T19:54:59.982+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -50,6 +50,7 @@ SWGRtlSdrSettings::init() {
|
||||
no_mod_mode = 0;
|
||||
transverter_mode = 0;
|
||||
transverter_delta_frequency = 0L;
|
||||
rf_bandwidth = 0;
|
||||
}
|
||||
|
||||
void
|
||||
@ -67,6 +68,7 @@ SWGRtlSdrSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGRtlSdrSettings*
|
||||
@ -93,6 +95,7 @@ SWGRtlSdrSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&no_mod_mode, pJson["noModMode"], "qint32", "");
|
||||
::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", "");
|
||||
::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", "");
|
||||
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "qint32", "");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -135,6 +138,8 @@ SWGRtlSdrSettings::asJsonObject() {
|
||||
|
||||
obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency));
|
||||
|
||||
obj->insert("rfBandwidth", QJsonValue(rf_bandwidth));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@ -255,6 +260,15 @@ SWGRtlSdrSettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequen
|
||||
this->transverter_delta_frequency = transverter_delta_frequency;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGRtlSdrSettings::getRfBandwidth() {
|
||||
return rf_bandwidth;
|
||||
}
|
||||
void
|
||||
SWGRtlSdrSettings::setRfBandwidth(qint32 rf_bandwidth) {
|
||||
this->rf_bandwidth = rf_bandwidth;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,9 @@ public:
|
||||
qint64 getTransverterDeltaFrequency();
|
||||
void setTransverterDeltaFrequency(qint64 transverter_delta_frequency);
|
||||
|
||||
qint32 getRfBandwidth();
|
||||
void setRfBandwidth(qint32 rf_bandwidth);
|
||||
|
||||
|
||||
private:
|
||||
qint32 dev_sample_rate;
|
||||
@ -95,6 +98,7 @@ private:
|
||||
qint32 no_mod_mode;
|
||||
qint32 transverter_mode;
|
||||
qint64 transverter_delta_frequency;
|
||||
qint32 rf_bandwidth;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user