mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-15 21:01:45 -05:00
AirspyHF: new settings
This commit is contained in:
parent
932048dba0
commit
013e512948
@ -227,6 +227,10 @@ void AirspyHFGui::displaySettings()
|
|||||||
ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex);
|
ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex);
|
||||||
ui->decim->setCurrentIndex(m_settings.m_log2Decim);
|
ui->decim->setCurrentIndex(m_settings.m_log2Decim);
|
||||||
ui->band->blockSignals(false);
|
ui->band->blockSignals(false);
|
||||||
|
ui->dsp->setChecked(m_settings.m_useDSP);
|
||||||
|
ui->lna->setChecked(m_settings.m_useLNA);
|
||||||
|
ui->att->setCurrentIndex(m_settings.m_attenuatorSteps);
|
||||||
|
displayAGC();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,6 +262,22 @@ void AirspyHFGui::displaySampleRates()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AirspyHFGui::displayAGC()
|
||||||
|
{
|
||||||
|
if (m_settings.m_useAGC)
|
||||||
|
{
|
||||||
|
if (m_settings.m_agcHigh) {
|
||||||
|
ui->agc->setCurrentIndex(2);
|
||||||
|
} else {
|
||||||
|
ui->agc->setCurrentIndex(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->agc->setCurrentIndex(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AirspyHFGui::sendSettings()
|
void AirspyHFGui::sendSettings()
|
||||||
{
|
{
|
||||||
if(!m_updateTimer.isActive())
|
if(!m_updateTimer.isActive())
|
||||||
@ -340,6 +360,48 @@ void AirspyHFGui::on_band_currentIndexChanged(int index)
|
|||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AirspyHFGui::on_dsp_toggled(bool checked)
|
||||||
|
{
|
||||||
|
m_settings.m_useDSP = checked;
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AirspyHFGui::on_lna_toggled(bool checked)
|
||||||
|
{
|
||||||
|
m_settings.m_useLNA = checked;
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AirspyHFGui::on_agc_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
if (index == 0)
|
||||||
|
{
|
||||||
|
m_settings.m_useAGC = false;
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
else if (index <= 2)
|
||||||
|
{
|
||||||
|
m_settings.m_useAGC = true;
|
||||||
|
|
||||||
|
if (index == 1) {
|
||||||
|
m_settings.m_agcHigh = false;
|
||||||
|
} else {
|
||||||
|
m_settings.m_agcHigh = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AirspyHFGui::on_att_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
if ((index >= 0) && (index <= 8))
|
||||||
|
{
|
||||||
|
m_settings.m_attenuatorSteps = index;
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AirspyHFGui::updateHardware()
|
void AirspyHFGui::updateHardware()
|
||||||
{
|
{
|
||||||
qDebug() << "AirspyHFGui::updateHardware";
|
qDebug() << "AirspyHFGui::updateHardware";
|
||||||
|
@ -72,6 +72,7 @@ private:
|
|||||||
void blockApplySettings(bool block) { m_doApplySettings = !block; }
|
void blockApplySettings(bool block) { m_doApplySettings = !block; }
|
||||||
void displaySettings();
|
void displaySettings();
|
||||||
void displaySampleRates();
|
void displaySampleRates();
|
||||||
|
void displayAGC();
|
||||||
void sendSettings();
|
void sendSettings();
|
||||||
void updateSampleRateAndFrequency();
|
void updateSampleRateAndFrequency();
|
||||||
void updateFrequencyLimits();
|
void updateFrequencyLimits();
|
||||||
@ -86,6 +87,10 @@ private slots:
|
|||||||
void on_record_toggled(bool checked);
|
void on_record_toggled(bool checked);
|
||||||
void on_transverter_clicked();
|
void on_transverter_clicked();
|
||||||
void on_band_currentIndexChanged(int index);
|
void on_band_currentIndexChanged(int index);
|
||||||
|
void on_dsp_toggled(bool checked);
|
||||||
|
void on_lna_toggled(bool checked);
|
||||||
|
void on_agc_currentIndexChanged(int index);
|
||||||
|
void on_att_currentIndexChanged(int index);
|
||||||
void updateHardware();
|
void updateHardware();
|
||||||
void updateStatus();
|
void updateStatus();
|
||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>324</width>
|
<width>324</width>
|
||||||
<height>132</height>
|
<height>160</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>320</width>
|
<width>320</width>
|
||||||
<height>132</height>
|
<height>160</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -409,6 +409,138 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="agcLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>AGC</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="agc">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>55</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Off</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Low</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>High</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="ButtonSwitch" name="lna">
|
||||||
|
<property name="text">
|
||||||
|
<string>LNA</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="attLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Att</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="att">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>6</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>12</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>18</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>24</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>30</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>36</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>42</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>48</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="attUnits">
|
||||||
|
<property name="text">
|
||||||
|
<string>dB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="ButtonSwitch" name="dsp">
|
||||||
|
<property name="text">
|
||||||
|
<string>DSP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="paddingLayout">
|
<layout class="QHBoxLayout" name="paddingLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -378,7 +378,23 @@ void AirspyHFInput::setDeviceCenterFrequency(quint64 freq_hz, const AirspyHFSett
|
|||||||
|
|
||||||
bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force)
|
bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force)
|
||||||
{
|
{
|
||||||
qDebug() << "AirspyHFInput::applySettings";
|
qDebug() << "AirspyHFInput::applySettings: "
|
||||||
|
<< " m_centerFrequency: " << settings.m_centerFrequency
|
||||||
|
<< " m_devSampleRateIndex: " << settings.m_devSampleRateIndex
|
||||||
|
<< " m_log2Decim: " << settings.m_log2Decim
|
||||||
|
<< " m_LOppmTenths: " << settings.m_LOppmTenths
|
||||||
|
<< " m_bandIndex: " << settings.m_bandIndex
|
||||||
|
<< " m_transverterDeltaFrequency: " << settings.m_transverterDeltaFrequency
|
||||||
|
<< " m_transverterMode: " << settings.m_transverterMode
|
||||||
|
<< " m_fileRecordName: " << settings.m_fileRecordName
|
||||||
|
<< " m_useDSP: " << settings.m_useDSP
|
||||||
|
<< " m_useAGC: " << settings.m_useAGC
|
||||||
|
<< " m_useLNA: " << settings.m_useLNA
|
||||||
|
<< " m_attenuatorSteps: " << settings.m_attenuatorSteps
|
||||||
|
<< " m_useReverseAPI: " << settings.m_useReverseAPI
|
||||||
|
<< " m_reverseAPIAddress: " << settings.m_reverseAPIAddress
|
||||||
|
<< " m_reverseAPIPort: " << settings.m_reverseAPIPort
|
||||||
|
<< " m_reverseAPIDeviceIndex: " << settings.m_reverseAPIDeviceIndex;
|
||||||
|
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
|
||||||
@ -482,6 +498,86 @@ bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force)
|
|||||||
forwardChange = true;
|
forwardChange = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((m_settings.m_useAGC != settings.m_useAGC) || force)
|
||||||
|
{
|
||||||
|
reverseAPIKeys.append("useAGC");
|
||||||
|
|
||||||
|
if (m_dev != 0)
|
||||||
|
{
|
||||||
|
rc = (airspyhf_error) airspyhf_set_hf_agc(m_dev, settings.m_useAGC ? 1 : 0);
|
||||||
|
|
||||||
|
if (rc != AIRSPYHF_SUCCESS) {
|
||||||
|
qCritical("AirspyHFInput::applySettings: could not set AGC to %d", settings.m_useAGC ? 1 : 0);
|
||||||
|
} else {
|
||||||
|
qDebug("AirspyHFInput::applySettings: set AGC to %d", settings.m_useAGC ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_settings.m_agcHigh != settings.m_agcHigh) || force)
|
||||||
|
{
|
||||||
|
reverseAPIKeys.append("agcHigh");
|
||||||
|
|
||||||
|
if (m_dev != 0)
|
||||||
|
{
|
||||||
|
rc = (airspyhf_error) airspyhf_set_hf_agc_threshold(m_dev, settings.m_agcHigh ? 1 : 0);
|
||||||
|
|
||||||
|
if (rc != AIRSPYHF_SUCCESS) {
|
||||||
|
qCritical("AirspyHFInput::applySettings: could not set AGC to %s", settings.m_agcHigh ? "high" : "low");
|
||||||
|
} else {
|
||||||
|
qDebug("AirspyHFInput::applySettings: set AGC to %s", settings.m_agcHigh ? "high" : "low");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_settings.m_useDSP != settings.m_useDSP) || force)
|
||||||
|
{
|
||||||
|
reverseAPIKeys.append("useDSP");
|
||||||
|
|
||||||
|
if (m_dev != 0)
|
||||||
|
{
|
||||||
|
rc = (airspyhf_error) airspyhf_set_lib_dsp(m_dev, settings.m_useDSP ? 1 : 0);
|
||||||
|
|
||||||
|
if (rc != AIRSPYHF_SUCCESS) {
|
||||||
|
qCritical("AirspyHFInput::applySettings: could not set DSP to %d", settings.m_useDSP ? 1 : 0);
|
||||||
|
} else {
|
||||||
|
qDebug("AirspyHFInput::applySettings: set DSP to %d", settings.m_useDSP ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_settings.m_useLNA != settings.m_useLNA) || force)
|
||||||
|
{
|
||||||
|
reverseAPIKeys.append("useLNA");
|
||||||
|
|
||||||
|
if (m_dev != 0)
|
||||||
|
{
|
||||||
|
rc = (airspyhf_error) airspyhf_set_hf_lna(m_dev, settings.m_useLNA ? 1 : 0);
|
||||||
|
|
||||||
|
if (rc != AIRSPYHF_SUCCESS) {
|
||||||
|
qCritical("AirspyHFInput::applySettings: could not set LNA to %d", settings.m_useLNA ? 1 : 0);
|
||||||
|
} else {
|
||||||
|
qDebug("AirspyHFInput::applySettings: set LNA to %d", settings.m_useLNA ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_settings.m_attenuatorSteps != settings.m_attenuatorSteps) || force)
|
||||||
|
{
|
||||||
|
reverseAPIKeys.append("attenuatorSteps");
|
||||||
|
|
||||||
|
if (m_dev != 0)
|
||||||
|
{
|
||||||
|
rc = (airspyhf_error) airspyhf_set_hf_att(m_dev, settings.m_attenuatorSteps);
|
||||||
|
|
||||||
|
if (rc != AIRSPYHF_SUCCESS) {
|
||||||
|
qCritical("AirspyHFInput::applySettings: could not set attenuator to %d dB", settings.m_attenuatorSteps * 6);
|
||||||
|
} else {
|
||||||
|
qDebug("AirspyHFInput::applySettings: set attenuator to %d dB", settings.m_attenuatorSteps * 6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (forwardChange && (sampleRateIndex >= 0))
|
if (forwardChange && (sampleRateIndex >= 0))
|
||||||
{
|
{
|
||||||
int sampleRate = m_sampleRates[sampleRateIndex]/(1<<settings.m_log2Decim);
|
int sampleRate = m_sampleRates[sampleRateIndex]/(1<<settings.m_log2Decim);
|
||||||
@ -584,6 +680,21 @@ int AirspyHFInput::webapiSettingsPutPatch(
|
|||||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||||
settings.m_reverseAPIDeviceIndex = response.getAirspyHfSettings()->getReverseApiDeviceIndex();
|
settings.m_reverseAPIDeviceIndex = response.getAirspyHfSettings()->getReverseApiDeviceIndex();
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("useAGC")) {
|
||||||
|
settings.m_useAGC = response.getAirspyHfSettings()->getUseAgc();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("agcHigh")) {
|
||||||
|
settings.m_agcHigh = response.getAirspyHfSettings()->getAgcHigh();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("useDSP")) {
|
||||||
|
settings.m_useDSP = response.getAirspyHfSettings()->getUseDsp();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("useLNA")) {
|
||||||
|
settings.m_useLNA = response.getAirspyHfSettings()->getUseLna();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("attenuatorSteps")) {
|
||||||
|
settings.m_attenuatorSteps = response.getAirspyHfSettings()->getAttenuatorSteps();
|
||||||
|
}
|
||||||
|
|
||||||
MsgConfigureAirspyHF *msg = MsgConfigureAirspyHF::create(settings, force);
|
MsgConfigureAirspyHF *msg = MsgConfigureAirspyHF::create(settings, force);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
@ -624,6 +735,11 @@ void AirspyHFInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
|||||||
|
|
||||||
response.getAirspyHfSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
response.getAirspyHfSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||||
response.getAirspyHfSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
response.getAirspyHfSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||||
|
response.getAirspyHfSettings()->setUseAgc(settings.m_useAGC ? 1 : 0);
|
||||||
|
response.getAirspyHfSettings()->setUseDsp(settings.m_useDSP ? 1 : 0);
|
||||||
|
response.getAirspyHfSettings()->setUseLna(settings.m_useLNA ? 1 : 0);
|
||||||
|
response.getAirspyHfSettings()->setAgcHigh(settings.m_agcHigh ? 1 : 0);
|
||||||
|
response.getAirspyHfSettings()->setAttenuatorSteps(settings.m_attenuatorSteps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AirspyHFInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
void AirspyHFInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||||
@ -710,6 +826,21 @@ void AirspyHFInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys
|
|||||||
if (deviceSettingsKeys.contains("fileRecordName") || force) {
|
if (deviceSettingsKeys.contains("fileRecordName") || force) {
|
||||||
swgAirspyHFSettings->setFileRecordName(new QString(settings.m_fileRecordName));
|
swgAirspyHFSettings->setFileRecordName(new QString(settings.m_fileRecordName));
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("useAGC")) {
|
||||||
|
swgAirspyHFSettings->setUseAgc(settings.m_useAGC ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("agcHigh")) {
|
||||||
|
swgAirspyHFSettings->setAgcHigh(settings.m_agcHigh ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("useDSP")) {
|
||||||
|
swgAirspyHFSettings->setUseDsp(settings.m_useDSP ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("useLNA")) {
|
||||||
|
swgAirspyHFSettings->setUseLna(settings.m_useLNA ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("attenuatorSteps")) {
|
||||||
|
swgAirspyHFSettings->setAttenuatorSteps(settings.m_attenuatorSteps);
|
||||||
|
}
|
||||||
|
|
||||||
QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings")
|
QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings")
|
||||||
.arg(settings.m_reverseAPIAddress)
|
.arg(settings.m_reverseAPIAddress)
|
||||||
|
@ -38,6 +38,11 @@ void AirspyHFSettings::resetToDefaults()
|
|||||||
m_reverseAPIAddress = "127.0.0.1";
|
m_reverseAPIAddress = "127.0.0.1";
|
||||||
m_reverseAPIPort = 8888;
|
m_reverseAPIPort = 8888;
|
||||||
m_reverseAPIDeviceIndex = 0;
|
m_reverseAPIDeviceIndex = 0;
|
||||||
|
m_useDSP = true;
|
||||||
|
m_useAGC = false;
|
||||||
|
m_agcHigh = false;
|
||||||
|
m_useLNA = false;
|
||||||
|
m_attenuatorSteps = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray AirspyHFSettings::serialize() const
|
QByteArray AirspyHFSettings::serialize() const
|
||||||
@ -54,6 +59,11 @@ QByteArray AirspyHFSettings::serialize() const
|
|||||||
s.writeString(11, m_reverseAPIAddress);
|
s.writeString(11, m_reverseAPIAddress);
|
||||||
s.writeU32(12, m_reverseAPIPort);
|
s.writeU32(12, m_reverseAPIPort);
|
||||||
s.writeU32(13, m_reverseAPIDeviceIndex);
|
s.writeU32(13, m_reverseAPIDeviceIndex);
|
||||||
|
s.writeBool(14, m_useDSP);
|
||||||
|
s.writeBool(15, m_useAGC);
|
||||||
|
s.writeBool(16, m_agcHigh);
|
||||||
|
s.writeBool(17, m_useLNA);
|
||||||
|
s.writeU32(18, m_attenuatorSteps);
|
||||||
|
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
@ -93,6 +103,12 @@ bool AirspyHFSettings::deserialize(const QByteArray& data)
|
|||||||
|
|
||||||
d.readU32(13, &uintval, 0);
|
d.readU32(13, &uintval, 0);
|
||||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||||
|
d.readBool(14, &m_useDSP, true);
|
||||||
|
d.readBool(15, &m_useAGC, false);
|
||||||
|
d.readBool(16, &m_agcHigh, false);
|
||||||
|
d.readBool(17, &m_useLNA, false);
|
||||||
|
d.readU32(18, &m_attenuatorSteps, 0);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -33,6 +33,11 @@ struct AirspyHFSettings
|
|||||||
QString m_reverseAPIAddress;
|
QString m_reverseAPIAddress;
|
||||||
uint16_t m_reverseAPIPort;
|
uint16_t m_reverseAPIPort;
|
||||||
uint16_t m_reverseAPIDeviceIndex;
|
uint16_t m_reverseAPIDeviceIndex;
|
||||||
|
bool m_useDSP;
|
||||||
|
bool m_useAGC;
|
||||||
|
bool m_agcHigh;
|
||||||
|
bool m_useLNA;
|
||||||
|
quint32 m_attenuatorSteps;
|
||||||
|
|
||||||
AirspyHFSettings();
|
AirspyHFSettings();
|
||||||
void resetToDefaults();
|
void resetToDefaults();
|
||||||
|
@ -1019,6 +1019,26 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"reverseAPIDeviceIndex" : {
|
"reverseAPIDeviceIndex" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"useAGC" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "AGC (1 for on, 0 for off)"
|
||||||
|
},
|
||||||
|
"agcHigh" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "AGC threshold (1 for high, 0 for low)"
|
||||||
|
},
|
||||||
|
"useDSP" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "LibairspyHF DSP (1 for on, 0 for off)"
|
||||||
|
},
|
||||||
|
"useLNA" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "LNA (1 for on, 0 for off)"
|
||||||
|
},
|
||||||
|
"attenuatorSteps" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Attenuator in number of 6 dB steps"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "AirspyHF"
|
"description" : "AirspyHF"
|
||||||
@ -24347,7 +24367,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2019-01-11T14:37:54.502+01:00
|
Generated 2019-01-14T01:23:06.065+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,21 @@ AirspyHFSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
reverseAPIDeviceIndex:
|
reverseAPIDeviceIndex:
|
||||||
type: integer
|
type: integer
|
||||||
|
useAGC:
|
||||||
|
description: AGC (1 for on, 0 for off)
|
||||||
|
type: integer
|
||||||
|
agcHigh:
|
||||||
|
description: AGC threshold (1 for high, 0 for low)
|
||||||
|
type: integer
|
||||||
|
useDSP:
|
||||||
|
description: LibairspyHF DSP (1 for on, 0 for off)
|
||||||
|
type: integer
|
||||||
|
useLNA:
|
||||||
|
description: LNA (1 for on, 0 for off)
|
||||||
|
type: integer
|
||||||
|
attenuatorSteps:
|
||||||
|
description: Attenuator in number of 6 dB steps
|
||||||
|
type: integer
|
||||||
|
|
||||||
AirspyHFReport:
|
AirspyHFReport:
|
||||||
description: AirspyHF
|
description: AirspyHF
|
||||||
|
@ -28,6 +28,21 @@ AirspyHFSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
reverseAPIDeviceIndex:
|
reverseAPIDeviceIndex:
|
||||||
type: integer
|
type: integer
|
||||||
|
useAGC:
|
||||||
|
description: AGC (1 for on, 0 for off)
|
||||||
|
type: integer
|
||||||
|
agcHigh:
|
||||||
|
description: AGC threshold (1 for high, 0 for low)
|
||||||
|
type: integer
|
||||||
|
useDSP:
|
||||||
|
description: LibairspyHF DSP (1 for on, 0 for off)
|
||||||
|
type: integer
|
||||||
|
useLNA:
|
||||||
|
description: LNA (1 for on, 0 for off)
|
||||||
|
type: integer
|
||||||
|
attenuatorSteps:
|
||||||
|
description: Attenuator in number of 6 dB steps
|
||||||
|
type: integer
|
||||||
|
|
||||||
AirspyHFReport:
|
AirspyHFReport:
|
||||||
description: AirspyHF
|
description: AirspyHF
|
||||||
|
@ -1019,6 +1019,26 @@ margin-bottom: 20px;
|
|||||||
},
|
},
|
||||||
"reverseAPIDeviceIndex" : {
|
"reverseAPIDeviceIndex" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"useAGC" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "AGC (1 for on, 0 for off)"
|
||||||
|
},
|
||||||
|
"agcHigh" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "AGC threshold (1 for high, 0 for low)"
|
||||||
|
},
|
||||||
|
"useDSP" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "LibairspyHF DSP (1 for on, 0 for off)"
|
||||||
|
},
|
||||||
|
"useLNA" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "LNA (1 for on, 0 for off)"
|
||||||
|
},
|
||||||
|
"attenuatorSteps" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Attenuator in number of 6 dB steps"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "AirspyHF"
|
"description" : "AirspyHF"
|
||||||
@ -24347,7 +24367,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2019-01-11T14:37:54.502+01:00
|
Generated 2019-01-14T01:23:06.065+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,6 +52,16 @@ SWGAirspyHFSettings::SWGAirspyHFSettings() {
|
|||||||
m_reverse_api_port_isSet = false;
|
m_reverse_api_port_isSet = false;
|
||||||
reverse_api_device_index = 0;
|
reverse_api_device_index = 0;
|
||||||
m_reverse_api_device_index_isSet = false;
|
m_reverse_api_device_index_isSet = false;
|
||||||
|
use_agc = 0;
|
||||||
|
m_use_agc_isSet = false;
|
||||||
|
agc_high = 0;
|
||||||
|
m_agc_high_isSet = false;
|
||||||
|
use_dsp = 0;
|
||||||
|
m_use_dsp_isSet = false;
|
||||||
|
use_lna = 0;
|
||||||
|
m_use_lna_isSet = false;
|
||||||
|
attenuator_steps = 0;
|
||||||
|
m_attenuator_steps_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGAirspyHFSettings::~SWGAirspyHFSettings() {
|
SWGAirspyHFSettings::~SWGAirspyHFSettings() {
|
||||||
@ -84,6 +94,16 @@ SWGAirspyHFSettings::init() {
|
|||||||
m_reverse_api_port_isSet = false;
|
m_reverse_api_port_isSet = false;
|
||||||
reverse_api_device_index = 0;
|
reverse_api_device_index = 0;
|
||||||
m_reverse_api_device_index_isSet = false;
|
m_reverse_api_device_index_isSet = false;
|
||||||
|
use_agc = 0;
|
||||||
|
m_use_agc_isSet = false;
|
||||||
|
agc_high = 0;
|
||||||
|
m_agc_high_isSet = false;
|
||||||
|
use_dsp = 0;
|
||||||
|
m_use_dsp_isSet = false;
|
||||||
|
use_lna = 0;
|
||||||
|
m_use_lna_isSet = false;
|
||||||
|
attenuator_steps = 0;
|
||||||
|
m_attenuator_steps_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -104,6 +124,11 @@ SWGAirspyHFSettings::cleanup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGAirspyHFSettings*
|
SWGAirspyHFSettings*
|
||||||
@ -141,6 +166,16 @@ SWGAirspyHFSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&use_agc, pJson["useAGC"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&agc_high, pJson["agcHigh"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&use_dsp, pJson["useDSP"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&use_lna, pJson["useLNA"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&attenuator_steps, pJson["attenuatorSteps"], "qint32", "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@ -193,6 +228,21 @@ SWGAirspyHFSettings::asJsonObject() {
|
|||||||
if(m_reverse_api_device_index_isSet){
|
if(m_reverse_api_device_index_isSet){
|
||||||
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
|
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
|
||||||
}
|
}
|
||||||
|
if(m_use_agc_isSet){
|
||||||
|
obj->insert("useAGC", QJsonValue(use_agc));
|
||||||
|
}
|
||||||
|
if(m_agc_high_isSet){
|
||||||
|
obj->insert("agcHigh", QJsonValue(agc_high));
|
||||||
|
}
|
||||||
|
if(m_use_dsp_isSet){
|
||||||
|
obj->insert("useDSP", QJsonValue(use_dsp));
|
||||||
|
}
|
||||||
|
if(m_use_lna_isSet){
|
||||||
|
obj->insert("useLNA", QJsonValue(use_lna));
|
||||||
|
}
|
||||||
|
if(m_attenuator_steps_isSet){
|
||||||
|
obj->insert("attenuatorSteps", QJsonValue(attenuator_steps));
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -317,6 +367,56 @@ SWGAirspyHFSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
|||||||
this->m_reverse_api_device_index_isSet = true;
|
this->m_reverse_api_device_index_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAirspyHFSettings::getUseAgc() {
|
||||||
|
return use_agc;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAirspyHFSettings::setUseAgc(qint32 use_agc) {
|
||||||
|
this->use_agc = use_agc;
|
||||||
|
this->m_use_agc_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAirspyHFSettings::getAgcHigh() {
|
||||||
|
return agc_high;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAirspyHFSettings::setAgcHigh(qint32 agc_high) {
|
||||||
|
this->agc_high = agc_high;
|
||||||
|
this->m_agc_high_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAirspyHFSettings::getUseDsp() {
|
||||||
|
return use_dsp;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAirspyHFSettings::setUseDsp(qint32 use_dsp) {
|
||||||
|
this->use_dsp = use_dsp;
|
||||||
|
this->m_use_dsp_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAirspyHFSettings::getUseLna() {
|
||||||
|
return use_lna;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAirspyHFSettings::setUseLna(qint32 use_lna) {
|
||||||
|
this->use_lna = use_lna;
|
||||||
|
this->m_use_lna_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAirspyHFSettings::getAttenuatorSteps() {
|
||||||
|
return attenuator_steps;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAirspyHFSettings::setAttenuatorSteps(qint32 attenuator_steps) {
|
||||||
|
this->attenuator_steps = attenuator_steps;
|
||||||
|
this->m_attenuator_steps_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGAirspyHFSettings::isSet(){
|
SWGAirspyHFSettings::isSet(){
|
||||||
@ -334,6 +434,11 @@ SWGAirspyHFSettings::isSet(){
|
|||||||
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){ isObjectUpdated = true; break;}
|
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){ isObjectUpdated = true; break;}
|
||||||
if(m_reverse_api_port_isSet){ isObjectUpdated = true; break;}
|
if(m_reverse_api_port_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_reverse_api_device_index_isSet){ isObjectUpdated = true; break;}
|
if(m_reverse_api_device_index_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_use_agc_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_agc_high_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_use_dsp_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_use_lna_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_attenuator_steps_isSet){ isObjectUpdated = true; break;}
|
||||||
}while(false);
|
}while(false);
|
||||||
return isObjectUpdated;
|
return isObjectUpdated;
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,21 @@ public:
|
|||||||
qint32 getReverseApiDeviceIndex();
|
qint32 getReverseApiDeviceIndex();
|
||||||
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
|
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
|
||||||
|
|
||||||
|
qint32 getUseAgc();
|
||||||
|
void setUseAgc(qint32 use_agc);
|
||||||
|
|
||||||
|
qint32 getAgcHigh();
|
||||||
|
void setAgcHigh(qint32 agc_high);
|
||||||
|
|
||||||
|
qint32 getUseDsp();
|
||||||
|
void setUseDsp(qint32 use_dsp);
|
||||||
|
|
||||||
|
qint32 getUseLna();
|
||||||
|
void setUseLna(qint32 use_lna);
|
||||||
|
|
||||||
|
qint32 getAttenuatorSteps();
|
||||||
|
void setAttenuatorSteps(qint32 attenuator_steps);
|
||||||
|
|
||||||
|
|
||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
@ -118,6 +133,21 @@ private:
|
|||||||
qint32 reverse_api_device_index;
|
qint32 reverse_api_device_index;
|
||||||
bool m_reverse_api_device_index_isSet;
|
bool m_reverse_api_device_index_isSet;
|
||||||
|
|
||||||
|
qint32 use_agc;
|
||||||
|
bool m_use_agc_isSet;
|
||||||
|
|
||||||
|
qint32 agc_high;
|
||||||
|
bool m_agc_high_isSet;
|
||||||
|
|
||||||
|
qint32 use_dsp;
|
||||||
|
bool m_use_dsp_isSet;
|
||||||
|
|
||||||
|
qint32 use_lna;
|
||||||
|
bool m_use_lna_isSet;
|
||||||
|
|
||||||
|
qint32 attenuator_steps;
|
||||||
|
bool m_attenuator_steps_isSet;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user