1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

Metis MISO: save stream index and spectrum stream index in settings. Make it available via API. Fixes #1126

This commit is contained in:
f4exb 2022-02-10 00:01:08 +01:00
parent 428a780e95
commit a99e4589f8
15 changed files with 561 additions and 64 deletions

View File

@ -312,6 +312,8 @@ bool MetisMISO::applySettings(const MetisMISOSettings& settings, bool force)
<< " m_dcBlock:" << settings.m_dcBlock << " m_dcBlock:" << settings.m_dcBlock
<< " m_iqCorrection:" << settings.m_iqCorrection << " m_iqCorrection:" << settings.m_iqCorrection
<< " m_txDrive:" << settings.m_txDrive << " m_txDrive:" << settings.m_txDrive
<< " m_streamIndex:" << m_settings.m_streamIndex
<< " m_spectrumStreamIndex:" << m_settings.m_spectrumStreamIndex
<< " m_useReverseAPI: " << settings.m_useReverseAPI << " m_useReverseAPI: " << settings.m_useReverseAPI
<< " m_reverseAPIAddress: " << settings.m_reverseAPIAddress << " m_reverseAPIAddress: " << settings.m_reverseAPIAddress
<< " m_reverseAPIPort: " << settings.m_reverseAPIPort << " m_reverseAPIPort: " << settings.m_reverseAPIPort
@ -442,6 +444,21 @@ bool MetisMISO::applySettings(const MetisMISOSettings& settings, bool force)
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(engineTxNotif); m_deviceAPI->getDeviceEngineInputMessageQueue()->push(engineTxNotif);
} }
if ((m_settings.m_streamIndex != settings.m_streamIndex) || force) {
reverseAPIKeys.append("streamIndex");
}
if ((m_settings.m_spectrumStreamIndex != settings.m_spectrumStreamIndex) || force)
{
reverseAPIKeys.append("spectrumStreamIndex");
if (settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) {
m_deviceAPI->setSpectrumSinkInput(true, m_settings.m_spectrumStreamIndex);
} else {
m_deviceAPI->setSpectrumSinkInput(false, 0);
}
}
if (propagateSettings) { if (propagateSettings) {
m_udpHandler.applySettings(settings); m_udpHandler.applySettings(settings);
} }
@ -647,6 +664,12 @@ void MetisMISO::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("txDrive")) { if (deviceSettingsKeys.contains("txDrive")) {
settings.m_txDrive = response.getMetisMisoSettings()->getTxDrive(); settings.m_txDrive = response.getMetisMisoSettings()->getTxDrive();
} }
if (deviceSettingsKeys.contains("spectrumStreamIndex")) {
settings.m_spectrumStreamIndex = response.getMetisMisoSettings()->getSpectrumStreamIndex();
}
if (deviceSettingsKeys.contains("streamIndex")) {
settings.m_streamIndex = response.getMetisMisoSettings()->getStreamIndex();
}
if (deviceSettingsKeys.contains("useReverseAPI")) { if (deviceSettingsKeys.contains("useReverseAPI")) {
settings.m_useReverseAPI = response.getMetisMisoSettings()->getUseReverseApi() != 0; settings.m_useReverseAPI = response.getMetisMisoSettings()->getUseReverseApi() != 0;
} }
@ -700,6 +723,8 @@ void MetisMISO::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& respo
response.getMetisMisoSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0); response.getMetisMisoSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
response.getMetisMisoSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0); response.getMetisMisoSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
response.getMetisMisoSettings()->setTxDrive(settings.m_txDrive); response.getMetisMisoSettings()->setTxDrive(settings.m_txDrive);
response.getMetisMisoSettings()->setSpectrumStreamIndex(settings.m_spectrumStreamIndex);
response.getMetisMisoSettings()->setStreamIndex(settings.m_streamIndex);
response.getMetisMisoSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); response.getMetisMisoSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
if (response.getMetisMisoSettings()->getReverseApiAddress()) { if (response.getMetisMisoSettings()->getReverseApiAddress()) {
@ -826,6 +851,12 @@ void MetisMISO::webapiReverseSendSettings(const QList<QString>& deviceSettingsKe
if (deviceSettingsKeys.contains("txDrive") || force) { if (deviceSettingsKeys.contains("txDrive") || force) {
swgMetisMISOSettings->setTxDrive(settings.m_txDrive); swgMetisMISOSettings->setTxDrive(settings.m_txDrive);
} }
if (deviceSettingsKeys.contains("spectrumStreamIndex") || force) {
swgMetisMISOSettings->setSpectrumStreamIndex(settings.m_spectrumStreamIndex);
}
if (deviceSettingsKeys.contains("streamIndex") || force) {
swgMetisMISOSettings->setStreamIndex(settings.m_streamIndex);
}
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings") QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings")
.arg(settings.m_reverseAPIAddress) .arg(settings.m_reverseAPIAddress)

View File

@ -53,8 +53,6 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) :
{ {
qDebug("MetisMISOGui::MetisMISOGui"); qDebug("MetisMISOGui::MetisMISOGui");
m_sampleMIMO = m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_sampleMIMO = m_deviceUISet->m_deviceAPI->getSampleMIMO();
m_streamIndex = 0;
m_spectrumStreamIndex = 0;
m_rxSampleRate = 48000; m_rxSampleRate = 48000;
m_txSampleRate = 48000; m_txSampleRate = 48000;
@ -94,9 +92,9 @@ void MetisMISOGui::resetToDefaults()
void MetisMISOGui::setCenterFrequency(qint64 centerFrequency) void MetisMISOGui::setCenterFrequency(qint64 centerFrequency)
{ {
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) { if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers) {
m_settings.m_rxCenterFrequencies[m_streamIndex] = centerFrequency; m_settings.m_rxCenterFrequencies[m_settings.m_streamIndex] = centerFrequency;
} else if (m_streamIndex == MetisMISOSettings::m_maxReceivers) { } else if (m_settings.m_streamIndex == MetisMISOSettings::m_maxReceivers) {
m_settings.m_txCenterFrequency = centerFrequency; m_settings.m_txCenterFrequency = centerFrequency;
} }
@ -135,18 +133,16 @@ void MetisMISOGui::on_streamIndex_currentIndexChanged(int index)
{ {
if (ui->streamLock->isChecked()) if (ui->streamLock->isChecked())
{ {
m_spectrumStreamIndex = index; m_settings.m_spectrumStreamIndex = index;
if (m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) if (m_settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers)
{ {
m_deviceUISet->m_spectrum->setDisplayedStream(true, index); m_deviceUISet->m_spectrum->setDisplayedStream(true, index);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(true, m_spectrumStreamIndex);
m_deviceUISet->setSpectrumScalingFactor(SDR_RX_SCALEF); m_deviceUISet->setSpectrumScalingFactor(SDR_RX_SCALEF);
} }
else else
{ {
m_deviceUISet->m_spectrum->setDisplayedStream(false, 0); m_deviceUISet->m_spectrum->setDisplayedStream(false, 0);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(false, 0);
m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF); m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF);
} }
@ -157,7 +153,8 @@ void MetisMISOGui::on_streamIndex_currentIndexChanged(int index)
ui->spectrumSource->blockSignals(false); ui->spectrumSource->blockSignals(false);
} }
m_streamIndex = index; m_settings.m_streamIndex = index;
sendSettings();
updateSubsamplingIndex(); updateSubsamplingIndex();
displayFrequency(); displayFrequency();
@ -166,18 +163,16 @@ void MetisMISOGui::on_streamIndex_currentIndexChanged(int index)
void MetisMISOGui::on_spectrumSource_currentIndexChanged(int index) void MetisMISOGui::on_spectrumSource_currentIndexChanged(int index)
{ {
m_spectrumStreamIndex = index; m_settings.m_spectrumStreamIndex = index;
if (m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) if (m_settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers)
{ {
m_deviceUISet->m_spectrum->setDisplayedStream(true, index); m_deviceUISet->m_spectrum->setDisplayedStream(true, index);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(true, m_spectrumStreamIndex);
m_deviceUISet->setSpectrumScalingFactor(SDR_RX_SCALEF); m_deviceUISet->setSpectrumScalingFactor(SDR_RX_SCALEF);
} }
else else
{ {
m_deviceUISet->m_spectrum->setDisplayedStream(false, 0); m_deviceUISet->m_spectrum->setDisplayedStream(false, 0);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(false, 0);
m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF); m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF);
} }
@ -188,11 +183,13 @@ void MetisMISOGui::on_spectrumSource_currentIndexChanged(int index)
ui->streamIndex->blockSignals(true); ui->streamIndex->blockSignals(true);
ui->streamIndex->setCurrentIndex(index); ui->streamIndex->setCurrentIndex(index);
ui->streamIndex->blockSignals(false); ui->streamIndex->blockSignals(false);
m_streamIndex = index; m_settings.m_streamIndex = index;
updateSubsamplingIndex(); updateSubsamplingIndex();
displayFrequency(); displayFrequency();
displaySampleRate(); displaySampleRate();
} }
sendSettings();
} }
void MetisMISOGui::on_streamLock_toggled(bool checked) void MetisMISOGui::on_streamLock_toggled(bool checked)
@ -211,9 +208,9 @@ void MetisMISOGui::on_LOppm_valueChanged(int value)
void MetisMISOGui::on_centerFrequency_changed(quint64 value) void MetisMISOGui::on_centerFrequency_changed(quint64 value)
{ {
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) { if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers) {
m_settings.m_rxCenterFrequencies[m_streamIndex] = value * 1000; m_settings.m_rxCenterFrequencies[m_settings.m_streamIndex] = value * 1000;
} else if (m_streamIndex == MetisMISOSettings::m_maxReceivers) { } else if (m_settings.m_streamIndex == MetisMISOSettings::m_maxReceivers) {
m_settings.m_txCenterFrequency = value * 1000; m_settings.m_txCenterFrequency = value * 1000;
} }
@ -235,9 +232,9 @@ void MetisMISOGui::on_log2Decim_currentIndexChanged(int index)
void MetisMISOGui::on_subsamplingIndex_currentIndexChanged(int index) void MetisMISOGui::on_subsamplingIndex_currentIndexChanged(int index)
{ {
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) // valid for Rx only if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers) // valid for Rx only
{ {
m_settings.m_rxSubsamplingIndexes[m_streamIndex] = index; m_settings.m_rxSubsamplingIndexes[m_settings.m_streamIndex] = index;
ui->subsamplingIndex->setToolTip(tr("Subsampling band index [%1 - %2 MHz]") ui->subsamplingIndex->setToolTip(tr("Subsampling band index [%1 - %2 MHz]")
.arg(index*61.44).arg((index+1)*61.44)); .arg(index*61.44).arg((index+1)*61.44));
displayFrequency(); displayFrequency();
@ -260,7 +257,7 @@ void MetisMISOGui::on_iqCorrection_toggled(bool checked)
void MetisMISOGui::on_transverter_clicked() void MetisMISOGui::on_transverter_clicked()
{ {
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers)
{ {
m_settings.m_rxTransverterMode = ui->transverter->getDeltaFrequencyAcive(); m_settings.m_rxTransverterMode = ui->transverter->getDeltaFrequencyAcive();
m_settings.m_rxTransverterDeltaFrequency = ui->transverter->getDeltaFrequency(); m_settings.m_rxTransverterDeltaFrequency = ui->transverter->getDeltaFrequency();
@ -326,8 +323,8 @@ void MetisMISOGui::displaySettings()
{ {
blockApplySettings(true); blockApplySettings(true);
ui->streamIndex->setCurrentIndex(m_streamIndex); ui->streamIndex->setCurrentIndex(m_settings.m_streamIndex);
ui->spectrumSource->setCurrentIndex(m_spectrumStreamIndex); ui->spectrumSource->setCurrentIndex(m_settings.m_spectrumStreamIndex);
ui->nbRxIndex->setCurrentIndex(m_settings.m_nbReceivers - 1); ui->nbRxIndex->setCurrentIndex(m_settings.m_nbReceivers - 1);
ui->samplerateIndex->setCurrentIndex(m_settings.m_sampleRateIndex); ui->samplerateIndex->setCurrentIndex(m_settings.m_sampleRateIndex);
ui->LOppm->setValue(m_settings.m_LOppmTenths); ui->LOppm->setValue(m_settings.m_LOppmTenths);
@ -405,6 +402,13 @@ bool MetisMISOGui::handleMessage(const Message& message)
qDebug("MetisMISOGui::handleMessage: MsgConfigureMetisMISO"); qDebug("MetisMISOGui::handleMessage: MsgConfigureMetisMISO");
const MetisMISO::MsgConfigureMetisMISO& cfg = (MetisMISO::MsgConfigureMetisMISO&) message; const MetisMISO::MsgConfigureMetisMISO& cfg = (MetisMISO::MsgConfigureMetisMISO&) message;
m_settings = cfg.getSettings(); m_settings = cfg.getSettings();
if ((m_settings.m_spectrumStreamIndex != m_settings.m_streamIndex) && (ui->streamLock->isChecked()))
{
m_settings.m_spectrumStreamIndex = m_settings.m_streamIndex;
sendSettings();
}
displaySettings(); displaySettings();
return true; return true;
} }
@ -479,14 +483,14 @@ void MetisMISOGui::displayFrequency()
qint64 centerFrequency; qint64 centerFrequency;
qint64 fBaseLow, fBaseHigh; qint64 fBaseLow, fBaseHigh;
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers)
{ {
int subsamplingIndex = m_settings.m_rxSubsamplingIndexes[m_streamIndex]; int subsamplingIndex = m_settings.m_rxSubsamplingIndexes[m_settings.m_streamIndex];
centerFrequency = m_settings.m_rxCenterFrequencies[m_streamIndex]; centerFrequency = m_settings.m_rxCenterFrequencies[m_settings.m_streamIndex];
fBaseLow = subsamplingIndex*m_absMaxFreq; fBaseLow = subsamplingIndex*m_absMaxFreq;
fBaseHigh = (subsamplingIndex+1)*m_absMaxFreq; fBaseHigh = (subsamplingIndex+1)*m_absMaxFreq;
} }
else if (m_streamIndex == MetisMISOSettings::m_maxReceivers) else if (m_settings.m_streamIndex == MetisMISOSettings::m_maxReceivers)
{ {
centerFrequency = m_settings.m_txCenterFrequency; centerFrequency = m_settings.m_txCenterFrequency;
fBaseLow = 0; fBaseLow = 0;
@ -505,7 +509,7 @@ void MetisMISOGui::displayFrequency()
void MetisMISOGui::displaySampleRate() void MetisMISOGui::displaySampleRate()
{ {
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) { if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers) {
ui->deviceRateText->setText(tr("%1k").arg((float) m_rxSampleRate / 1000)); ui->deviceRateText->setText(tr("%1k").arg((float) m_rxSampleRate / 1000));
} else { } else {
ui->deviceRateText->setText(tr("%1k").arg((float) m_txSampleRate / 1000)); ui->deviceRateText->setText(tr("%1k").arg((float) m_txSampleRate / 1000));
@ -516,9 +520,9 @@ void MetisMISOGui::updateSpectrum()
{ {
qint64 centerFrequency; qint64 centerFrequency;
if (m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) { if (m_settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) {
centerFrequency = m_settings.m_rxCenterFrequencies[m_spectrumStreamIndex]; centerFrequency = m_settings.m_rxCenterFrequencies[m_settings.m_spectrumStreamIndex];
} else if (m_spectrumStreamIndex == MetisMISOSettings::m_maxReceivers) { } else if (m_settings.m_spectrumStreamIndex == MetisMISOSettings::m_maxReceivers) {
centerFrequency = m_settings.m_txCenterFrequency; centerFrequency = m_settings.m_txCenterFrequency;
} else { } else {
centerFrequency = 0; centerFrequency = 0;
@ -526,7 +530,7 @@ void MetisMISOGui::updateSpectrum()
m_deviceUISet->getSpectrum()->setCenterFrequency(centerFrequency); m_deviceUISet->getSpectrum()->setCenterFrequency(centerFrequency);
if (m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) { if (m_settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) {
m_deviceUISet->getSpectrum()->setSampleRate(m_rxSampleRate); m_deviceUISet->getSpectrum()->setSampleRate(m_rxSampleRate);
} else { } else {
m_deviceUISet->getSpectrum()->setSampleRate(m_txSampleRate); m_deviceUISet->getSpectrum()->setSampleRate(m_txSampleRate);
@ -535,10 +539,10 @@ void MetisMISOGui::updateSpectrum()
void MetisMISOGui::updateSubsamplingIndex() void MetisMISOGui::updateSubsamplingIndex()
{ {
if (m_streamIndex < MetisMISOSettings::m_maxReceivers) if (m_settings.m_streamIndex < MetisMISOSettings::m_maxReceivers)
{ {
ui->subsamplingIndex->setEnabled(true); ui->subsamplingIndex->setEnabled(true);
ui->subsamplingIndex->setCurrentIndex(m_settings.m_rxSubsamplingIndexes[m_streamIndex]); ui->subsamplingIndex->setCurrentIndex(m_settings.m_rxSubsamplingIndexes[m_settings.m_streamIndex]);
} }
else else
{ {

View File

@ -51,8 +51,6 @@ private:
DeviceUISet* m_deviceUISet; DeviceUISet* m_deviceUISet;
MetisMISOSettings m_settings; MetisMISOSettings m_settings;
int m_streamIndex; //!< Current stream index being dealt with
int m_spectrumStreamIndex; //!< Index of the stream displayed on main spectrum
int m_rxSampleRate; int m_rxSampleRate;
int m_txSampleRate; int m_txSampleRate;
QTimer m_updateTimer; QTimer m_updateTimer;

View File

@ -46,6 +46,8 @@ MetisMISOSettings::MetisMISOSettings(const MetisMISOSettings& other)
m_dcBlock = other.m_dcBlock; m_dcBlock = other.m_dcBlock;
m_iqCorrection = other.m_iqCorrection; m_iqCorrection = other.m_iqCorrection;
m_txDrive = other.m_txDrive; m_txDrive = other.m_txDrive;
m_streamIndex = other.m_streamIndex;
m_spectrumStreamIndex = other.m_spectrumStreamIndex;
m_useReverseAPI = other.m_useReverseAPI; m_useReverseAPI = other.m_useReverseAPI;
m_reverseAPIAddress = other.m_reverseAPIAddress; m_reverseAPIAddress = other.m_reverseAPIAddress;
m_reverseAPIPort = other.m_reverseAPIPort; m_reverseAPIPort = other.m_reverseAPIPort;
@ -74,6 +76,8 @@ void MetisMISOSettings::resetToDefaults()
m_dcBlock = false; m_dcBlock = false;
m_iqCorrection = false; m_iqCorrection = false;
m_txDrive = 15; m_txDrive = 15;
m_streamIndex = 0;
m_spectrumStreamIndex = 0;
m_useReverseAPI = false; m_useReverseAPI = false;
m_reverseAPIAddress = "127.0.0.1"; m_reverseAPIAddress = "127.0.0.1";
m_reverseAPIPort = 8888; m_reverseAPIPort = 8888;
@ -106,6 +110,8 @@ QByteArray MetisMISOSettings::serialize() const
s.writeString(20, m_reverseAPIAddress); s.writeString(20, m_reverseAPIAddress);
s.writeU32(21, m_reverseAPIPort); s.writeU32(21, m_reverseAPIPort);
s.writeU32(22, m_reverseAPIDeviceIndex); s.writeU32(22, m_reverseAPIDeviceIndex);
s.writeS32(23, m_streamIndex);
s.writeS32(24, m_spectrumStreamIndex);
for (int i = 0; i < m_maxReceivers; i++) for (int i = 0; i < m_maxReceivers; i++)
{ {
@ -167,6 +173,9 @@ bool MetisMISOSettings::deserialize(const QByteArray& data)
d.readU32(50+i, &m_rxSubsamplingIndexes[i], 0); d.readU32(50+i, &m_rxSubsamplingIndexes[i], 0);
} }
d.readS32(23, &m_streamIndex, 0);
d.readS32(24, &m_spectrumStreamIndex, 0);
return true; return true;
} }
else else

View File

@ -42,6 +42,8 @@ struct MetisMISOSettings {
bool m_dcBlock; bool m_dcBlock;
bool m_iqCorrection; bool m_iqCorrection;
unsigned int m_txDrive; unsigned int m_txDrive;
int m_streamIndex;
int m_spectrumStreamIndex; //!< spectrum source
bool m_useReverseAPI; bool m_useReverseAPI;
QString m_reverseAPIAddress; QString m_reverseAPIAddress;
uint16_t m_reverseAPIPort; uint16_t m_reverseAPIPort;

View File

@ -763,19 +763,60 @@ margin-bottom: 20px;
"removeTimeout" : { "removeTimeout" : {
"type" : "integer" "type" : "integer"
}, },
"beastEnabled" : { "feedEnabled" : {
"type" : "integer",
"description" : "Send data to beast server\n * 0 - Do not send data\n * 1 - Send data\n"
},
"beastHost" : {
"type" : "string"
},
"beastPort" : {
"type" : "integer" "type" : "integer"
}, },
"feedFormat" : { "exportClientEnabled" : {
"type" : "integer", "type" : "integer",
"description" : "Format of sent data\n * 0 - Beast binary\n * 1 - Beast index\n" "description" : "Send data to server\n * 0 - Do not send data\n * 1 - Send data\n"
},
"exportClientHost" : {
"type" : "string",
"description" : "Host to send data to"
},
"exportClientPort" : {
"type" : "integer"
},
"exportClientFormat" : {
"type" : "integer",
"description" : "Format of sent data\n * 0 - Beast binary\n * 1 - Beast hex\n"
},
"exportServerEnabled" : {
"type" : "integer"
},
"exportServerPort" : {
"type" : "integer"
},
"importEnabled" : {
"type" : "integer"
},
"importHost" : {
"type" : "string"
},
"importUsername" : {
"type" : "string"
},
"importPassword" : {
"type" : "string"
},
"importParameters" : {
"type" : "string"
},
"importPeriod" : {
"type" : "number",
"format" : "float"
},
"importMinLatitude" : {
"type" : "string"
},
"importMaxLatitude" : {
"type" : "string"
},
"importMinLongitude" : {
"type" : "string"
},
"importMaxLongitude" : {
"type" : "string"
}, },
"logFilename" : { "logFilename" : {
"type" : "string" "type" : "string"
@ -5285,6 +5326,9 @@ margin-bottom: 20px;
"GS232ControllerReport" : { "GS232ControllerReport" : {
"$ref" : "#/definitions/GS232ControllerReport" "$ref" : "#/definitions/GS232ControllerReport"
}, },
"MapReport" : {
"$ref" : "#/definitions/MapReport"
},
"PERTesterReport" : { "PERTesterReport" : {
"$ref" : "#/definitions/PERTesterReport" "$ref" : "#/definitions/PERTesterReport"
}, },
@ -8170,6 +8214,15 @@ margin-bottom: 20px;
} }
}, },
"description" : "An item to draw on the map. Set image to an empty string to remove item from the map." "description" : "An item to draw on the map. Set image to an empty string to remove item from the map."
};
defs.MapReport = {
"properties" : {
"dateTime" : {
"type" : "string",
"description" : "Current date and time being displayed by 3D map"
}
},
"description" : "Map"
}; };
defs.MapSettings = { defs.MapSettings = {
"properties" : { "properties" : {
@ -8349,6 +8402,14 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Tx drive level (0 to 15)" "description" : "Tx drive level (0 to 15)"
}, },
"streamIndex" : {
"type" : "integer",
"description" : "The index of the stream currently in scope"
},
"spectrumStreamIndex" : {
"type" : "integer",
"description" : "The index of the stream that is used as source of the main spectrum"
},
"useReverseAPI" : { "useReverseAPI" : {
"type" : "integer", "type" : "integer",
"description" : "Synchronize with reverse API * 0 - disabled * 1 - enabled\n" "description" : "Synchronize with reverse API * 0 - disabled * 1 - enabled\n"
@ -11272,6 +11333,81 @@ margin-bottom: 20px;
} }
}, },
"description" : "List of device set settings for a satellite" "description" : "List of device set settings for a satellite"
};
defs.SatellitePass = {
"properties" : {
"aos" : {
"type" : "string",
"description" : "Date and time of AOS"
},
"los" : {
"type" : "string",
"description" : "Date and time of LOS"
},
"maxElevation" : {
"type" : "number",
"format" : "float",
"description" : "Maximum elevation of pass in degrees"
}
}
};
defs.SatelliteState = {
"properties" : {
"name" : {
"type" : "string"
},
"latitude" : {
"type" : "number",
"format" : "float",
"description" : "Latitude of satellite in degrees"
},
"longitude" : {
"type" : "number",
"format" : "float",
"description" : "Longitude of satellite in degrees"
},
"altitude" : {
"type" : "number",
"format" : "float",
"description" : "Altitude of satellite in km"
},
"azimuth" : {
"type" : "number",
"format" : "float",
"description" : "Azimuth to satellite in degrees"
},
"elevation" : {
"type" : "number",
"format" : "float",
"description" : "Elevation to satellite in degrees"
},
"range" : {
"type" : "number",
"format" : "float",
"description" : "Satellite range in km"
},
"rangeRate" : {
"type" : "number",
"format" : "float",
"description" : "Satellite range rate in km/s"
},
"speed" : {
"type" : "number",
"format" : "float",
"description" : "Satellite speed in km/s"
},
"period" : {
"type" : "number",
"format" : "float",
"description" : "Satellite period in minutes"
},
"passes" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/SatellitePass"
}
}
}
}; };
defs.SatelliteTrackerActions = { defs.SatelliteTrackerActions = {
"properties" : { "properties" : {
@ -11287,6 +11423,12 @@ margin-bottom: 20px;
"runningState" : { "runningState" : {
"type" : "integer", "type" : "integer",
"description" : "Running state\n * 0 - not started\n * 1 - idle\n * 2 - running\n * 3 - error\n" "description" : "Running state\n * 0 - not started\n * 1 - idle\n * 2 - running\n * 3 - error\n"
},
"satelliteState" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/SatelliteState"
}
} }
}, },
"description" : "Satellite Tracker report" "description" : "Satellite Tracker report"
@ -52280,7 +52422,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2022-02-06T20:14:33.369+01:00 Generated 2022-02-09T21:10:57.247+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -35,22 +35,50 @@ ADSBDemodSettings:
description: Number of taps per phase in channel interpolator description: Number of taps per phase in channel interpolator
removeTimeout: removeTimeout:
type: integer type: integer
beastEnabled: feedEnabled:
type: integer
exportClientEnabled:
type: integer type: integer
description: > description: >
Send data to beast server Send data to server
* 0 - Do not send data * 0 - Do not send data
* 1 - Send data * 1 - Send data
beastHost: exportClientHost:
description: Host to send data to
type: string type: string
beastPort: exportClientPort:
type: integer type: integer
feedFormat: exportClientFormat:
type: integer type: integer
description: > description: >
Format of sent data Format of sent data
* 0 - Beast binary * 0 - Beast binary
* 1 - Beast index * 1 - Beast hex
exportServerEnabled:
type: integer
exportServerPort:
type: integer
importEnabled:
type: integer
importHost:
type: string
importUsername:
type: string
importPassword:
type: string
importParameters:
type: string
importPeriod:
type: number
format: float
importMinLatitude:
type: string
importMaxLatitude:
type: string
importMinLongitude:
type: string
importMaxLongitude:
type: string
logFilename: logFilename:
type: string type: string
logEnabled: logEnabled:

View File

@ -11,6 +11,8 @@ FeatureReport:
$ref: "/doc/swagger/include/AFC.yaml#/AFCReport" $ref: "/doc/swagger/include/AFC.yaml#/AFCReport"
GS232ControllerReport: GS232ControllerReport:
$ref: "/doc/swagger/include/GS232Controller.yaml#/GS232ControllerReport" $ref: "/doc/swagger/include/GS232Controller.yaml#/GS232ControllerReport"
MapReport:
$ref: "/doc/swagger/include/Map.yaml#/MapReport"
PERTesterReport: PERTesterReport:
$ref: "/doc/swagger/include/PERTester.yaml#/PERTesterReport" $ref: "/doc/swagger/include/PERTester.yaml#/PERTesterReport"
RigCtlServerReport: RigCtlServerReport:

View File

@ -22,6 +22,13 @@ MapSettings:
rollupState: rollupState:
$ref: "/doc/swagger/include/RollupState.yaml#/RollupState" $ref: "/doc/swagger/include/RollupState.yaml#/RollupState"
MapReport:
description: Map
properties:
dateTime:
description: "Current date and time being displayed by 3D map"
type: string
MapActions: MapActions:
description: Map description: Map
properties: properties:

View File

@ -139,6 +139,12 @@ MetisMISOSettings:
txDrive: txDrive:
type: integer type: integer
description: Tx drive level (0 to 15) description: Tx drive level (0 to 15)
streamIndex:
type: integer
description: The index of the stream currently in scope
spectrumStreamIndex:
type: integer
description: The index of the stream that is used as source of the main spectrum
useReverseAPI: useReverseAPI:
type: integer type: integer
description: > description: >

View File

@ -179,6 +179,68 @@ SatelliteTrackerReport:
* 1 - idle * 1 - idle
* 2 - running * 2 - running
* 3 - error * 3 - error
satelliteState:
type: array
items:
$ref: "/doc/swagger/include/SatelliteTracker.yaml#/SatelliteState"
SatelliteState:
properties:
name:
type: string
latitude:
description: "Latitude of satellite in degrees"
type: number
format: float
longitude:
description: "Longitude of satellite in degrees"
type: number
format: float
altitude:
description: "Altitude of satellite in km"
type: number
format: float
azimuth:
description: "Azimuth to satellite in degrees"
type: number
format: float
elevation:
description: "Elevation to satellite in degrees"
type: number
format: float
range:
description: "Satellite range in km"
type: number
format: float
rangeRate:
description: "Satellite range rate in km/s"
type: number
format: float
speed:
description: "Satellite speed in km/s"
type: number
format: float
period:
description: "Satellite period in minutes"
type: number
format: float
passes:
type: array
items:
$ref: "/doc/swagger/include/SatelliteTracker.yaml#/SatellitePass"
SatellitePass:
properties:
aos:
description: "Date and time of AOS"
type: string
los:
description: "Date and time of LOS"
type: string
maxElevation:
description: "Maximum elevation of pass in degrees"
type: number
format: float
SatelliteTrackerActions: SatelliteTrackerActions:
description: "Satellite Tracker actions" description: "Satellite Tracker actions"

View File

@ -139,6 +139,12 @@ MetisMISOSettings:
txDrive: txDrive:
type: integer type: integer
description: Tx drive level (0 to 15) description: Tx drive level (0 to 15)
streamIndex:
type: integer
description: The index of the stream currently in scope
spectrumStreamIndex:
type: integer
description: The index of the stream that is used as source of the main spectrum
useReverseAPI: useReverseAPI:
type: integer type: integer
description: > description: >

View File

@ -763,19 +763,60 @@ margin-bottom: 20px;
"removeTimeout" : { "removeTimeout" : {
"type" : "integer" "type" : "integer"
}, },
"beastEnabled" : { "feedEnabled" : {
"type" : "integer",
"description" : "Send data to beast server\n * 0 - Do not send data\n * 1 - Send data\n"
},
"beastHost" : {
"type" : "string"
},
"beastPort" : {
"type" : "integer" "type" : "integer"
}, },
"feedFormat" : { "exportClientEnabled" : {
"type" : "integer", "type" : "integer",
"description" : "Format of sent data\n * 0 - Beast binary\n * 1 - Beast index\n" "description" : "Send data to server\n * 0 - Do not send data\n * 1 - Send data\n"
},
"exportClientHost" : {
"type" : "string",
"description" : "Host to send data to"
},
"exportClientPort" : {
"type" : "integer"
},
"exportClientFormat" : {
"type" : "integer",
"description" : "Format of sent data\n * 0 - Beast binary\n * 1 - Beast hex\n"
},
"exportServerEnabled" : {
"type" : "integer"
},
"exportServerPort" : {
"type" : "integer"
},
"importEnabled" : {
"type" : "integer"
},
"importHost" : {
"type" : "string"
},
"importUsername" : {
"type" : "string"
},
"importPassword" : {
"type" : "string"
},
"importParameters" : {
"type" : "string"
},
"importPeriod" : {
"type" : "number",
"format" : "float"
},
"importMinLatitude" : {
"type" : "string"
},
"importMaxLatitude" : {
"type" : "string"
},
"importMinLongitude" : {
"type" : "string"
},
"importMaxLongitude" : {
"type" : "string"
}, },
"logFilename" : { "logFilename" : {
"type" : "string" "type" : "string"
@ -5285,6 +5326,9 @@ margin-bottom: 20px;
"GS232ControllerReport" : { "GS232ControllerReport" : {
"$ref" : "#/definitions/GS232ControllerReport" "$ref" : "#/definitions/GS232ControllerReport"
}, },
"MapReport" : {
"$ref" : "#/definitions/MapReport"
},
"PERTesterReport" : { "PERTesterReport" : {
"$ref" : "#/definitions/PERTesterReport" "$ref" : "#/definitions/PERTesterReport"
}, },
@ -8170,6 +8214,15 @@ margin-bottom: 20px;
} }
}, },
"description" : "An item to draw on the map. Set image to an empty string to remove item from the map." "description" : "An item to draw on the map. Set image to an empty string to remove item from the map."
};
defs.MapReport = {
"properties" : {
"dateTime" : {
"type" : "string",
"description" : "Current date and time being displayed by 3D map"
}
},
"description" : "Map"
}; };
defs.MapSettings = { defs.MapSettings = {
"properties" : { "properties" : {
@ -8349,6 +8402,14 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Tx drive level (0 to 15)" "description" : "Tx drive level (0 to 15)"
}, },
"streamIndex" : {
"type" : "integer",
"description" : "The index of the stream currently in scope"
},
"spectrumStreamIndex" : {
"type" : "integer",
"description" : "The index of the stream that is used as source of the main spectrum"
},
"useReverseAPI" : { "useReverseAPI" : {
"type" : "integer", "type" : "integer",
"description" : "Synchronize with reverse API * 0 - disabled * 1 - enabled\n" "description" : "Synchronize with reverse API * 0 - disabled * 1 - enabled\n"
@ -11272,6 +11333,81 @@ margin-bottom: 20px;
} }
}, },
"description" : "List of device set settings for a satellite" "description" : "List of device set settings for a satellite"
};
defs.SatellitePass = {
"properties" : {
"aos" : {
"type" : "string",
"description" : "Date and time of AOS"
},
"los" : {
"type" : "string",
"description" : "Date and time of LOS"
},
"maxElevation" : {
"type" : "number",
"format" : "float",
"description" : "Maximum elevation of pass in degrees"
}
}
};
defs.SatelliteState = {
"properties" : {
"name" : {
"type" : "string"
},
"latitude" : {
"type" : "number",
"format" : "float",
"description" : "Latitude of satellite in degrees"
},
"longitude" : {
"type" : "number",
"format" : "float",
"description" : "Longitude of satellite in degrees"
},
"altitude" : {
"type" : "number",
"format" : "float",
"description" : "Altitude of satellite in km"
},
"azimuth" : {
"type" : "number",
"format" : "float",
"description" : "Azimuth to satellite in degrees"
},
"elevation" : {
"type" : "number",
"format" : "float",
"description" : "Elevation to satellite in degrees"
},
"range" : {
"type" : "number",
"format" : "float",
"description" : "Satellite range in km"
},
"rangeRate" : {
"type" : "number",
"format" : "float",
"description" : "Satellite range rate in km/s"
},
"speed" : {
"type" : "number",
"format" : "float",
"description" : "Satellite speed in km/s"
},
"period" : {
"type" : "number",
"format" : "float",
"description" : "Satellite period in minutes"
},
"passes" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/SatellitePass"
}
}
}
}; };
defs.SatelliteTrackerActions = { defs.SatelliteTrackerActions = {
"properties" : { "properties" : {
@ -11287,6 +11423,12 @@ margin-bottom: 20px;
"runningState" : { "runningState" : {
"type" : "integer", "type" : "integer",
"description" : "Running state\n * 0 - not started\n * 1 - idle\n * 2 - running\n * 3 - error\n" "description" : "Running state\n * 0 - not started\n * 1 - idle\n * 2 - running\n * 3 - error\n"
},
"satelliteState" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/SatelliteState"
}
} }
}, },
"description" : "Satellite Tracker report" "description" : "Satellite Tracker report"
@ -52280,7 +52422,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2022-02-06T20:14:33.369+01:00 Generated 2022-02-09T21:10:57.247+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -96,6 +96,10 @@ SWGMetisMISOSettings::SWGMetisMISOSettings() {
m_iq_correction_isSet = false; m_iq_correction_isSet = false;
tx_drive = 0; tx_drive = 0;
m_tx_drive_isSet = false; m_tx_drive_isSet = false;
stream_index = 0;
m_stream_index_isSet = false;
spectrum_stream_index = 0;
m_spectrum_stream_index_isSet = false;
use_reverse_api = 0; use_reverse_api = 0;
m_use_reverse_api_isSet = false; m_use_reverse_api_isSet = false;
reverse_api_address = nullptr; reverse_api_address = nullptr;
@ -180,6 +184,10 @@ SWGMetisMISOSettings::init() {
m_iq_correction_isSet = false; m_iq_correction_isSet = false;
tx_drive = 0; tx_drive = 0;
m_tx_drive_isSet = false; m_tx_drive_isSet = false;
stream_index = 0;
m_stream_index_isSet = false;
spectrum_stream_index = 0;
m_spectrum_stream_index_isSet = false;
use_reverse_api = 0; use_reverse_api = 0;
m_use_reverse_api_isSet = false; m_use_reverse_api_isSet = false;
reverse_api_address = new QString(""); reverse_api_address = new QString("");
@ -224,6 +232,8 @@ SWGMetisMISOSettings::cleanup() {
@ -313,6 +323,10 @@ SWGMetisMISOSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&tx_drive, pJson["txDrive"], "qint32", ""); ::SWGSDRangel::setValue(&tx_drive, pJson["txDrive"], "qint32", "");
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
::SWGSDRangel::setValue(&spectrum_stream_index, pJson["spectrumStreamIndex"], "qint32", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", ""); ::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString"); ::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
@ -439,6 +453,12 @@ SWGMetisMISOSettings::asJsonObject() {
if(m_tx_drive_isSet){ if(m_tx_drive_isSet){
obj->insert("txDrive", QJsonValue(tx_drive)); obj->insert("txDrive", QJsonValue(tx_drive));
} }
if(m_stream_index_isSet){
obj->insert("streamIndex", QJsonValue(stream_index));
}
if(m_spectrum_stream_index_isSet){
obj->insert("spectrumStreamIndex", QJsonValue(spectrum_stream_index));
}
if(m_use_reverse_api_isSet){ if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api)); obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
} }
@ -795,6 +815,26 @@ SWGMetisMISOSettings::setTxDrive(qint32 tx_drive) {
this->m_tx_drive_isSet = true; this->m_tx_drive_isSet = true;
} }
qint32
SWGMetisMISOSettings::getStreamIndex() {
return stream_index;
}
void
SWGMetisMISOSettings::setStreamIndex(qint32 stream_index) {
this->stream_index = stream_index;
this->m_stream_index_isSet = true;
}
qint32
SWGMetisMISOSettings::getSpectrumStreamIndex() {
return spectrum_stream_index;
}
void
SWGMetisMISOSettings::setSpectrumStreamIndex(qint32 spectrum_stream_index) {
this->spectrum_stream_index = spectrum_stream_index;
this->m_spectrum_stream_index_isSet = true;
}
qint32 qint32
SWGMetisMISOSettings::getUseReverseApi() { SWGMetisMISOSettings::getUseReverseApi() {
return use_reverse_api; return use_reverse_api;
@ -942,6 +982,12 @@ SWGMetisMISOSettings::isSet(){
if(m_tx_drive_isSet){ if(m_tx_drive_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_stream_index_isSet){
isObjectUpdated = true; break;
}
if(m_spectrum_stream_index_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){ if(m_use_reverse_api_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }

View File

@ -144,6 +144,12 @@ public:
qint32 getTxDrive(); qint32 getTxDrive();
void setTxDrive(qint32 tx_drive); void setTxDrive(qint32 tx_drive);
qint32 getStreamIndex();
void setStreamIndex(qint32 stream_index);
qint32 getSpectrumStreamIndex();
void setSpectrumStreamIndex(qint32 spectrum_stream_index);
qint32 getUseReverseApi(); qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api); void setUseReverseApi(qint32 use_reverse_api);
@ -262,6 +268,12 @@ private:
qint32 tx_drive; qint32 tx_drive;
bool m_tx_drive_isSet; bool m_tx_drive_isSet;
qint32 stream_index;
bool m_stream_index_isSet;
qint32 spectrum_stream_index;
bool m_spectrum_stream_index_isSet;
qint32 use_reverse_api; qint32 use_reverse_api;
bool m_use_reverse_api_isSet; bool m_use_reverse_api_isSet;