mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-30 20:52:26 -04:00
AudioCATSISO: fix audio sample rate handling and device enumeration
This commit is contained in:
parent
2dbc61a92e
commit
49f2527fcd
Binary file not shown.
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 49 KiB |
Binary file not shown.
@ -307,7 +307,7 @@ const QString& AudioCATSISO::getDeviceDescription() const
|
|||||||
|
|
||||||
int AudioCATSISO::getSourceSampleRate(int) const
|
int AudioCATSISO::getSourceSampleRate(int) const
|
||||||
{
|
{
|
||||||
return m_rxSampleRate / (1<<m_settings.m_log2Decim);
|
return m_settings.m_rxSampleRate / (1<<m_settings.m_log2Decim);
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 AudioCATSISO::getSourceCenterFrequency(int) const
|
quint64 AudioCATSISO::getSourceCenterFrequency(int) const
|
||||||
@ -332,7 +332,7 @@ void AudioCATSISO::setSourceCenterFrequency(qint64 centerFrequency, int)
|
|||||||
|
|
||||||
int AudioCATSISO::getSinkSampleRate(int) const
|
int AudioCATSISO::getSinkSampleRate(int) const
|
||||||
{
|
{
|
||||||
return m_txSampleRate;
|
return m_settings.m_txSampleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 AudioCATSISO::getSinkCenterFrequency(int) const
|
quint64 AudioCATSISO::getSinkCenterFrequency(int) const
|
||||||
@ -460,10 +460,18 @@ void AudioCATSISO::applySettings(const AudioCATSISOSettings& settings, const QLi
|
|||||||
<< " force:" << force
|
<< " force:" << force
|
||||||
<< settings.getDebugString(settingsKeys, force);
|
<< settings.getDebugString(settingsKeys, force);
|
||||||
|
|
||||||
if (settingsKeys.contains("rxDeviceName") || force)
|
if (settingsKeys.contains("rxDeviceName") || settingsKeys.contains("rxSampleRate") || force)
|
||||||
{
|
{
|
||||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||||
m_rxAudioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_rxDeviceName);
|
m_rxAudioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_rxDeviceName);
|
||||||
|
AudioDeviceManager::InputDeviceInfo deviceInfo;
|
||||||
|
|
||||||
|
if (audioDeviceManager->getInputDeviceInfo(settings.m_rxDeviceName, deviceInfo))
|
||||||
|
{
|
||||||
|
deviceInfo.sampleRate = settings.m_rxSampleRate;
|
||||||
|
audioDeviceManager->setInputDeviceInfo(m_rxAudioDeviceIndex, deviceInfo);
|
||||||
|
}
|
||||||
|
|
||||||
m_rxSampleRate = audioDeviceManager->getInputSampleRate(m_rxAudioDeviceIndex);
|
m_rxSampleRate = audioDeviceManager->getInputSampleRate(m_rxAudioDeviceIndex);
|
||||||
forwardRxChange = true;
|
forwardRxChange = true;
|
||||||
|
|
||||||
@ -476,10 +484,18 @@ void AudioCATSISO::applySettings(const AudioCATSISOSettings& settings, const QLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settingsKeys.contains("txDeviceName") || force)
|
if (settingsKeys.contains("txDeviceName") || settingsKeys.contains("txSampleRate") || force)
|
||||||
{
|
{
|
||||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||||
m_txAudioDeviceIndex = audioDeviceManager->getOutputDeviceIndex(settings.m_txDeviceName);
|
m_txAudioDeviceIndex = audioDeviceManager->getOutputDeviceIndex(settings.m_txDeviceName);
|
||||||
|
AudioDeviceManager::InputDeviceInfo deviceInfo;
|
||||||
|
|
||||||
|
if (audioDeviceManager->getInputDeviceInfo(settings.m_txDeviceName, deviceInfo))
|
||||||
|
{
|
||||||
|
deviceInfo.sampleRate = settings.m_txSampleRate;
|
||||||
|
audioDeviceManager->setInputDeviceInfo(m_txAudioDeviceIndex, deviceInfo);
|
||||||
|
}
|
||||||
|
|
||||||
m_txSampleRate = audioDeviceManager->getOutputSampleRate(m_txAudioDeviceIndex);
|
m_txSampleRate = audioDeviceManager->getOutputSampleRate(m_txAudioDeviceIndex);
|
||||||
forwardTxChange = true;
|
forwardTxChange = true;
|
||||||
|
|
||||||
@ -595,12 +611,13 @@ void AudioCATSISO::applySettings(const AudioCATSISOSettings& settings, const QLi
|
|||||||
bool realElseComplex = (m_settings.m_rxIQMapping == AudioCATSISOSettings::L)
|
bool realElseComplex = (m_settings.m_rxIQMapping == AudioCATSISOSettings::L)
|
||||||
|| (m_settings.m_rxIQMapping == AudioCATSISOSettings::R);
|
|| (m_settings.m_rxIQMapping == AudioCATSISOSettings::R);
|
||||||
DSPMIMOSignalNotification *notif = new DSPMIMOSignalNotification(
|
DSPMIMOSignalNotification *notif = new DSPMIMOSignalNotification(
|
||||||
m_rxSampleRate / (1<<m_settings.m_log2Decim),
|
m_settings.m_rxSampleRate / (1<<m_settings.m_log2Decim),
|
||||||
settings.m_rxCenterFrequency,
|
m_settings.m_rxCenterFrequency,
|
||||||
true,
|
true,
|
||||||
0,
|
0,
|
||||||
realElseComplex
|
realElseComplex
|
||||||
);
|
);
|
||||||
|
m_rxSampleRate = notif->getSampleRate();
|
||||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,12 +630,13 @@ void AudioCATSISO::applySettings(const AudioCATSISOSettings& settings, const QLi
|
|||||||
bool realElseComplex = (m_settings.m_txIQMapping == AudioCATSISOSettings::L)
|
bool realElseComplex = (m_settings.m_txIQMapping == AudioCATSISOSettings::L)
|
||||||
|| (m_settings.m_txIQMapping == AudioCATSISOSettings::R);
|
|| (m_settings.m_txIQMapping == AudioCATSISOSettings::R);
|
||||||
DSPMIMOSignalNotification *notif = new DSPMIMOSignalNotification(
|
DSPMIMOSignalNotification *notif = new DSPMIMOSignalNotification(
|
||||||
m_txSampleRate,
|
m_settings.m_txSampleRate,
|
||||||
settings.m_txCenterFrequency,
|
m_settings.m_txCenterFrequency,
|
||||||
false,
|
false,
|
||||||
0,
|
0,
|
||||||
realElseComplex
|
realElseComplex
|
||||||
);
|
);
|
||||||
|
m_txSampleRate = notif->getSampleRate();
|
||||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -713,9 +731,15 @@ void AudioCATSISO::webapiUpdateDeviceSettings(
|
|||||||
if (deviceSettingsKeys.contains("rxCenterFrequency")) {
|
if (deviceSettingsKeys.contains("rxCenterFrequency")) {
|
||||||
settings.m_rxCenterFrequency = response.getAudioCatsisoSettings()->getRxCenterFrequency();
|
settings.m_rxCenterFrequency = response.getAudioCatsisoSettings()->getRxCenterFrequency();
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("rxSampleRate")) {
|
||||||
|
settings.m_rxSampleRate = response.getAudioCatsisoSettings()->getRxSampleRate();
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("txCenterFrequency")) {
|
if (deviceSettingsKeys.contains("txCenterFrequency")) {
|
||||||
settings.m_txCenterFrequency = response.getAudioCatsisoSettings()->getTxCenterFrequency();
|
settings.m_txCenterFrequency = response.getAudioCatsisoSettings()->getTxCenterFrequency();
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("txSampleRate")) {
|
||||||
|
settings.m_txSampleRate = response.getAudioCatsisoSettings()->getTxSampleRate();
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("transverterMode")) {
|
if (deviceSettingsKeys.contains("transverterMode")) {
|
||||||
settings.m_transverterMode = response.getAudioCatsisoSettings()->getTransverterMode() != 0;
|
settings.m_transverterMode = response.getAudioCatsisoSettings()->getTransverterMode() != 0;
|
||||||
}
|
}
|
||||||
@ -805,7 +829,9 @@ void AudioCATSISO::webapiUpdateDeviceSettings(
|
|||||||
void AudioCATSISO::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const AudioCATSISOSettings& settings)
|
void AudioCATSISO::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const AudioCATSISOSettings& settings)
|
||||||
{
|
{
|
||||||
response.getAudioCatsisoSettings()->setRxCenterFrequency(settings.m_rxCenterFrequency);
|
response.getAudioCatsisoSettings()->setRxCenterFrequency(settings.m_rxCenterFrequency);
|
||||||
|
response.getAudioCatsisoSettings()->setRxSampleRate(settings.m_rxSampleRate);
|
||||||
response.getAudioCatsisoSettings()->setTxCenterFrequency(settings.m_txCenterFrequency);
|
response.getAudioCatsisoSettings()->setTxCenterFrequency(settings.m_txCenterFrequency);
|
||||||
|
response.getAudioCatsisoSettings()->setTxSampleRate(settings.m_txSampleRate);
|
||||||
response.getAudioCatsisoSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
|
response.getAudioCatsisoSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
|
||||||
response.getAudioCatsisoSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
|
response.getAudioCatsisoSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
|
||||||
response.getAudioCatsisoSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
response.getAudioCatsisoSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
||||||
@ -859,9 +885,15 @@ void AudioCATSISO::webapiReverseSendSettings(const QList<QString>& deviceSetting
|
|||||||
if (deviceSettingsKeys.contains("rxCenterFrequency")) {
|
if (deviceSettingsKeys.contains("rxCenterFrequency")) {
|
||||||
swgAudioCATSISOSettings->setRxCenterFrequency(settings.m_rxCenterFrequency);
|
swgAudioCATSISOSettings->setRxCenterFrequency(settings.m_rxCenterFrequency);
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("rxSampleRate") || force) {
|
||||||
|
swgAudioCATSISOSettings->setRxSampleRate(settings.m_rxSampleRate);
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("txCenterFrequency")) {
|
if (deviceSettingsKeys.contains("txCenterFrequency")) {
|
||||||
swgAudioCATSISOSettings->setTxCenterFrequency(settings.m_txCenterFrequency);
|
swgAudioCATSISOSettings->setTxCenterFrequency(settings.m_txCenterFrequency);
|
||||||
}
|
}
|
||||||
|
if (deviceSettingsKeys.contains("txSampleRate") || force) {
|
||||||
|
swgAudioCATSISOSettings->setTxSampleRate(settings.m_txSampleRate);
|
||||||
|
}
|
||||||
if (deviceSettingsKeys.contains("transverterMode")) {
|
if (deviceSettingsKeys.contains("transverterMode")) {
|
||||||
swgAudioCATSISOSettings->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
swgAudioCATSISOSettings->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,76 @@ bool AudioCATSISOGUI::deserialize(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudioCATSISOGUI::refreshRxSampleRates(QString deviceName)
|
||||||
|
{
|
||||||
|
ui->rxSampleRate->blockSignals(true);
|
||||||
|
ui->rxSampleRate->clear();
|
||||||
|
const auto deviceInfos = AudioDeviceInfo::availableInputDevices();
|
||||||
|
|
||||||
|
for (const AudioDeviceInfo &deviceInfo : deviceInfos)
|
||||||
|
{
|
||||||
|
if (deviceName == AudioCATSISOSettings::getFullDeviceName(deviceInfo))
|
||||||
|
{
|
||||||
|
QList<int> sampleRates = deviceInfo.supportedSampleRates();
|
||||||
|
|
||||||
|
for (int i = 0; i < sampleRates.size(); ++i)
|
||||||
|
{
|
||||||
|
qDebug("AudioCATSISOGUI::refreshRxSampleRates: device %s: sample rate %d", qPrintable(deviceName), sampleRates[i]);
|
||||||
|
ui->rxSampleRate->addItem(QString("%1").arg(sampleRates[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->rxSampleRate->blockSignals(false);
|
||||||
|
|
||||||
|
int index = ui->rxSampleRate->findText(QString("%1").arg(m_settings.m_rxSampleRate));
|
||||||
|
|
||||||
|
if (index >= 0) {
|
||||||
|
ui->rxSampleRate->setCurrentIndex(index);
|
||||||
|
} else {
|
||||||
|
ui->rxSampleRate->setCurrentIndex(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ui->rxSampleRate->currentText().toInt() != m_settings.m_rxSampleRate) {
|
||||||
|
on_rxSampleRate_currentIndexChanged(ui->rxSampleRate->currentIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudioCATSISOGUI::refreshTxSampleRates(QString deviceName)
|
||||||
|
{
|
||||||
|
ui->txSampleRate->blockSignals(true);
|
||||||
|
ui->txSampleRate->clear();
|
||||||
|
const auto deviceInfos = AudioDeviceInfo::availableOutputDevices();
|
||||||
|
|
||||||
|
for (const AudioDeviceInfo &deviceInfo : deviceInfos)
|
||||||
|
{
|
||||||
|
if (deviceName == AudioCATSISOSettings::getFullDeviceName(deviceInfo))
|
||||||
|
{
|
||||||
|
QList<int> sampleRates = deviceInfo.supportedSampleRates();
|
||||||
|
|
||||||
|
for (int i = 0; i < sampleRates.size(); ++i)
|
||||||
|
{
|
||||||
|
qDebug("AudioCATSISOGUI::refreshTxSampleRates: device %s: sample rate %d", qPrintable(deviceName), sampleRates[i]);
|
||||||
|
ui->txSampleRate->addItem(QString("%1").arg(sampleRates[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->txSampleRate->blockSignals(false);
|
||||||
|
|
||||||
|
int index = ui->txSampleRate->findText(QString("%1").arg(m_settings.m_txSampleRate));
|
||||||
|
|
||||||
|
if (index >= 0) {
|
||||||
|
ui->txSampleRate->setCurrentIndex(index);
|
||||||
|
} else {
|
||||||
|
ui->txSampleRate->setCurrentIndex(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ui->txSampleRate->currentText().toInt() != m_settings.m_txSampleRate) {
|
||||||
|
on_txSampleRate_currentIndexChanged(ui->txSampleRate->currentIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AudioCATSISOGUI::on_startStop_toggled(bool checked)
|
void AudioCATSISOGUI::on_startStop_toggled(bool checked)
|
||||||
{
|
{
|
||||||
ui->txEnable->setEnabled(!checked);
|
ui->txEnable->setEnabled(!checked);
|
||||||
@ -335,12 +405,22 @@ void AudioCATSISOGUI::on_rxDeviceSelect_clicked()
|
|||||||
if (audioSelect.m_selected)
|
if (audioSelect.m_selected)
|
||||||
{
|
{
|
||||||
m_settings.m_rxDeviceName = audioSelect.m_audioDeviceName;
|
m_settings.m_rxDeviceName = audioSelect.m_audioDeviceName;
|
||||||
|
refreshRxSampleRates(m_settings.m_rxDeviceName);
|
||||||
m_settingsKeys.append("rxDeviceName");
|
m_settingsKeys.append("rxDeviceName");
|
||||||
ui->rxDeviceLabel->setText(m_settings.m_rxDeviceName);
|
ui->rxDeviceLabel->setText(m_settings.m_rxDeviceName);
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudioCATSISOGUI::on_rxSampleRate_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
(void) index;
|
||||||
|
m_settings.m_rxSampleRate = ui->rxSampleRate->currentText().toInt();
|
||||||
|
displayFcRxTooltip();
|
||||||
|
m_settingsKeys.append("rxSampleRate");
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
|
||||||
void AudioCATSISOGUI::on_txDeviceSelect_clicked()
|
void AudioCATSISOGUI::on_txDeviceSelect_clicked()
|
||||||
{
|
{
|
||||||
AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_txDeviceName, false, this);
|
AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_txDeviceName, false, this);
|
||||||
@ -350,12 +430,21 @@ void AudioCATSISOGUI::on_txDeviceSelect_clicked()
|
|||||||
if (audioSelect.m_selected)
|
if (audioSelect.m_selected)
|
||||||
{
|
{
|
||||||
m_settings.m_txDeviceName = audioSelect.m_audioDeviceName;
|
m_settings.m_txDeviceName = audioSelect.m_audioDeviceName;
|
||||||
|
refreshTxSampleRates(m_settings.m_txDeviceName);
|
||||||
m_settingsKeys.append("txDeviceName");
|
m_settingsKeys.append("txDeviceName");
|
||||||
ui->txDeviceLabel->setText(m_settings.m_txDeviceName);
|
ui->txDeviceLabel->setText(m_settings.m_txDeviceName);
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudioCATSISOGUI::on_txSampleRate_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
(void) index;
|
||||||
|
m_settings.m_txSampleRate = ui->txSampleRate->currentText().toInt();
|
||||||
|
m_settingsKeys.append("txSampleRate");
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
|
||||||
void AudioCATSISOGUI::on_rxChannels_currentIndexChanged(int index)
|
void AudioCATSISOGUI::on_rxChannels_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
m_settings.m_rxIQMapping = (AudioCATSISOSettings::IQMapping)index;
|
m_settings.m_rxIQMapping = (AudioCATSISOSettings::IQMapping)index;
|
||||||
@ -450,6 +539,8 @@ void AudioCATSISOGUI::displaySettings()
|
|||||||
displayFcRxTooltip();
|
displayFcRxTooltip();
|
||||||
displayCatDevice();
|
displayCatDevice();
|
||||||
displayCatType();
|
displayCatType();
|
||||||
|
refreshRxSampleRates(m_settings.m_rxDeviceName);
|
||||||
|
refreshTxSampleRates(m_settings.m_txDeviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioCATSISOGUI::displayFcRxTooltip()
|
void AudioCATSISOGUI::displayFcRxTooltip()
|
||||||
@ -457,7 +548,7 @@ void AudioCATSISOGUI::displayFcRxTooltip()
|
|||||||
int32_t fShift = DeviceSampleSource::calculateFrequencyShift(
|
int32_t fShift = DeviceSampleSource::calculateFrequencyShift(
|
||||||
m_settings.m_log2Decim,
|
m_settings.m_log2Decim,
|
||||||
(DeviceSampleSource::fcPos_t) m_settings.m_fcPosRx,
|
(DeviceSampleSource::fcPos_t) m_settings.m_fcPosRx,
|
||||||
m_rxSampleRate,
|
m_settings.m_rxSampleRate,
|
||||||
DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD
|
DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD
|
||||||
);
|
);
|
||||||
ui->fcPosRx->setToolTip(tr("Relative position of device center frequency: %1 kHz").arg(QString::number(fShift / 1000.0f, 'g', 5)));
|
ui->fcPosRx->setToolTip(tr("Relative position of device center frequency: %1 kHz").arg(QString::number(fShift / 1000.0f, 'g', 5)));
|
||||||
@ -576,7 +667,7 @@ bool AudioCATSISOGUI::handleMessage(const Message& message)
|
|||||||
|
|
||||||
if (sourceOrSink)
|
if (sourceOrSink)
|
||||||
{
|
{
|
||||||
m_rxSampleRate = notif.getSampleRate() * (1<<m_settings.m_log2Decim);
|
m_rxSampleRate = notif.getSampleRate();
|
||||||
m_settings.m_rxCenterFrequency = frequency;
|
m_settings.m_rxCenterFrequency = frequency;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -727,7 +818,7 @@ void AudioCATSISOGUI::updateSpectrum(bool rxElseTx)
|
|||||||
{
|
{
|
||||||
realElseComplex = (m_settings.m_rxIQMapping == AudioCATSISOSettings::L)
|
realElseComplex = (m_settings.m_rxIQMapping == AudioCATSISOSettings::L)
|
||||||
|| (m_settings.m_rxIQMapping == AudioCATSISOSettings::R);
|
|| (m_settings.m_rxIQMapping == AudioCATSISOSettings::R);
|
||||||
sampleRate = m_rxSampleRate/(1<<m_settings.m_log2Decim);
|
sampleRate = m_rxSampleRate;
|
||||||
centerFrequency = m_settings.m_rxCenterFrequency;
|
centerFrequency = m_settings.m_rxCenterFrequency;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -789,7 +880,9 @@ void AudioCATSISOGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->pttSpectrumLink, &ButtonSwitch::toggled, this, &AudioCATSISOGUI::on_pttSpectrumLinkToggled);
|
QObject::connect(ui->pttSpectrumLink, &ButtonSwitch::toggled, this, &AudioCATSISOGUI::on_pttSpectrumLinkToggled);
|
||||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &AudioCATSISOGUI::on_transverter_clicked);
|
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &AudioCATSISOGUI::on_transverter_clicked);
|
||||||
QObject::connect(ui->rxDeviceSelect, &QPushButton::clicked, this, &AudioCATSISOGUI::on_rxDeviceSelect_clicked);
|
QObject::connect(ui->rxDeviceSelect, &QPushButton::clicked, this, &AudioCATSISOGUI::on_rxDeviceSelect_clicked);
|
||||||
|
QObject::connect(ui->rxSampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioCATSISOGUI::on_rxSampleRate_currentIndexChanged);
|
||||||
QObject::connect(ui->txDeviceSelect, &QPushButton::clicked, this, &AudioCATSISOGUI::on_txDeviceSelect_clicked);
|
QObject::connect(ui->txDeviceSelect, &QPushButton::clicked, this, &AudioCATSISOGUI::on_txDeviceSelect_clicked);
|
||||||
|
QObject::connect(ui->txSampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioCATSISOGUI::on_txSampleRate_currentIndexChanged);
|
||||||
QObject::connect(ui->rxChannels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioCATSISOGUI::on_rxChannels_currentIndexChanged);
|
QObject::connect(ui->rxChannels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioCATSISOGUI::on_rxChannels_currentIndexChanged);
|
||||||
QObject::connect(ui->rxVolume, &QDial::valueChanged, this, &AudioCATSISOGUI::on_rxVolume_valueChanged);
|
QObject::connect(ui->rxVolume, &QDial::valueChanged, this, &AudioCATSISOGUI::on_rxVolume_valueChanged);
|
||||||
QObject::connect(ui->txChannels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioCATSISOGUI::on_txChannels_currentIndexChanged);
|
QObject::connect(ui->txChannels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioCATSISOGUI::on_txChannels_currentIndexChanged);
|
||||||
|
@ -69,6 +69,8 @@ private:
|
|||||||
AudioCATSISOSettings::MsgCATReportStatus::Status m_lastCATStatus;
|
AudioCATSISOSettings::MsgCATReportStatus::Status m_lastCATStatus;
|
||||||
|
|
||||||
void blockApplySettings(bool block) { m_doApplySettings = !block; }
|
void blockApplySettings(bool block) { m_doApplySettings = !block; }
|
||||||
|
void refreshRxSampleRates(QString deviceName);
|
||||||
|
void refreshTxSampleRates(QString deviceName);
|
||||||
void displaySettings();
|
void displaySettings();
|
||||||
void displayFrequency();
|
void displayFrequency();
|
||||||
void displaySampleRate();
|
void displaySampleRate();
|
||||||
@ -101,7 +103,9 @@ private slots:
|
|||||||
void on_txEnable_toggled(bool checked);
|
void on_txEnable_toggled(bool checked);
|
||||||
void on_transverter_clicked();
|
void on_transverter_clicked();
|
||||||
void on_rxDeviceSelect_clicked();
|
void on_rxDeviceSelect_clicked();
|
||||||
|
void on_rxSampleRate_currentIndexChanged(int index);
|
||||||
void on_txDeviceSelect_clicked();
|
void on_txDeviceSelect_clicked();
|
||||||
|
void on_txSampleRate_currentIndexChanged(int index);
|
||||||
void on_rxChannels_currentIndexChanged(int index);
|
void on_rxChannels_currentIndexChanged(int index);
|
||||||
void on_rxVolume_valueChanged(int value);
|
void on_rxVolume_valueChanged(int value);
|
||||||
void on_txChannels_currentIndexChanged(int index);
|
void on_txChannels_currentIndexChanged(int index);
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
<font>
|
<font>
|
||||||
<family>Liberation Sans</family>
|
<family>Liberation Sans</family>
|
||||||
<pointsize>9</pointsize>
|
<pointsize>9</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
@ -333,6 +334,7 @@
|
|||||||
<font>
|
<font>
|
||||||
<family>Liberation Mono</family>
|
<family>Liberation Mono</family>
|
||||||
<pointsize>16</pointsize>
|
<pointsize>16</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
@ -422,6 +424,45 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="rxSampleRateLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>SR</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="rxSampleRate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Audio sample rate in Hz</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -703,6 +744,45 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="txSampleRateLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>SR</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="txSampleRate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Audio sample rate in Hz</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -89,12 +89,12 @@ PluginInterface::SamplingDevices AudioCATSISOPlugin::enumSampleMIMO(const Origin
|
|||||||
m_deviceTypeID,
|
m_deviceTypeID,
|
||||||
it->serial,
|
it->serial,
|
||||||
it->sequence,
|
it->sequence,
|
||||||
PluginInterface::SamplingDevice::PhysicalDevice,
|
PluginInterface::SamplingDevice::BuiltInDevice,
|
||||||
PluginInterface::SamplingDevice::StreamMIMO,
|
PluginInterface::SamplingDevice::StreamMIMO,
|
||||||
1, // MIMO is always considered as a single device
|
1, // MIMO is always considered as a single device
|
||||||
0)
|
0)
|
||||||
);
|
);
|
||||||
qDebug("MetisMISOPlugin::enumSampleMIMO: enumerated Metis device #%d", it->sequence);
|
qDebug("AudioCATSISOPlugin::enumSampleMIMO: enumerated AudioCATSISO device #%d", it->sequence);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,8 @@ void AudioCATSISOSettings::resetToDefaults()
|
|||||||
m_pttSpectrumLink = true;
|
m_pttSpectrumLink = true;
|
||||||
m_rxCenterFrequency = 14200000;
|
m_rxCenterFrequency = 14200000;
|
||||||
m_txCenterFrequency = 14200000;
|
m_txCenterFrequency = 14200000;
|
||||||
|
m_rxSampleRate = 48000; // Default sample rate
|
||||||
|
m_txSampleRate = 48000; // Default sample rate
|
||||||
m_transverterMode = false;
|
m_transverterMode = false;
|
||||||
m_transverterDeltaFrequency = 0;
|
m_transverterDeltaFrequency = 0;
|
||||||
m_rxDeviceName = "";
|
m_rxDeviceName = "";
|
||||||
@ -108,6 +110,8 @@ AudioCATSISOSettings::AudioCATSISOSettings(const AudioCATSISOSettings& other)
|
|||||||
m_pttSpectrumLink = other.m_pttSpectrumLink;
|
m_pttSpectrumLink = other.m_pttSpectrumLink;
|
||||||
m_rxCenterFrequency = other.m_rxCenterFrequency;
|
m_rxCenterFrequency = other.m_rxCenterFrequency;
|
||||||
m_txCenterFrequency = other.m_txCenterFrequency;
|
m_txCenterFrequency = other.m_txCenterFrequency;
|
||||||
|
m_rxSampleRate = other.m_rxSampleRate;
|
||||||
|
m_txSampleRate = other.m_txSampleRate;
|
||||||
m_transverterMode = other.m_transverterMode;
|
m_transverterMode = other.m_transverterMode;
|
||||||
m_transverterDeltaFrequency = other.m_transverterDeltaFrequency;
|
m_transverterDeltaFrequency = other.m_transverterDeltaFrequency;
|
||||||
m_rxDeviceName = other.m_rxDeviceName;
|
m_rxDeviceName = other.m_rxDeviceName;
|
||||||
@ -150,11 +154,13 @@ QByteArray AudioCATSISOSettings::serialize() const
|
|||||||
s.writeS32(8, (int) m_fcPosRx);
|
s.writeS32(8, (int) m_fcPosRx);
|
||||||
s.writeBool(9, m_transverterMode);
|
s.writeBool(9, m_transverterMode);
|
||||||
s.writeS64(10, m_transverterDeltaFrequency);
|
s.writeS64(10, m_transverterDeltaFrequency);
|
||||||
|
s.writeS32(11, m_rxSampleRate); // Serialize RX sample rate
|
||||||
|
|
||||||
s.writeString(21, m_txDeviceName);
|
s.writeString(21, m_txDeviceName);
|
||||||
s.writeU64(22, m_txCenterFrequency);
|
s.writeU64(22, m_txCenterFrequency);
|
||||||
s.writeS32(23, m_txVolume);
|
s.writeS32(23, m_txVolume);
|
||||||
s.writeS32(24, (int)m_txIQMapping);
|
s.writeS32(24, (int)m_txIQMapping);
|
||||||
|
s.writeS32(25, m_txSampleRate); // Serialize TX sample rate
|
||||||
|
|
||||||
s.writeString(31, m_catDevicePath);
|
s.writeString(31, m_catDevicePath);
|
||||||
s.writeU32(32, m_hamlibModel);
|
s.writeU32(32, m_hamlibModel);
|
||||||
@ -203,11 +209,13 @@ bool AudioCATSISOSettings::deserialize(const QByteArray& data)
|
|||||||
m_fcPosRx = (fcPos_t) intval;
|
m_fcPosRx = (fcPos_t) intval;
|
||||||
d.readBool(9, &m_transverterMode, false);
|
d.readBool(9, &m_transverterMode, false);
|
||||||
d.readS64(10, &m_transverterDeltaFrequency, 0);
|
d.readS64(10, &m_transverterDeltaFrequency, 0);
|
||||||
|
d.readS32(11, &m_rxSampleRate, 48000); // Deserialize RX sample rate
|
||||||
|
|
||||||
d.readString(21, &m_txDeviceName, "");
|
d.readString(21, &m_txDeviceName, "");
|
||||||
d.readU64(22, &m_txCenterFrequency, 14200000);
|
d.readU64(22, &m_txCenterFrequency, 14200000);
|
||||||
d.readS32(23, &m_txVolume, -10);
|
d.readS32(23, &m_txVolume, -10);
|
||||||
d.readS32(24,(int *)&m_txIQMapping, IQMapping::LR);
|
d.readS32(24,(int *)&m_txIQMapping, IQMapping::LR);
|
||||||
|
d.readS32(25, &m_txSampleRate, 48000); // Deserialize TX sample rate
|
||||||
|
|
||||||
d.readString(31, &m_catDevicePath, "");
|
d.readString(31, &m_catDevicePath, "");
|
||||||
d.readU32(32, &m_hamlibModel, 1);
|
d.readU32(32, &m_hamlibModel, 1);
|
||||||
@ -257,6 +265,9 @@ void AudioCATSISOSettings::applySettings(const QStringList& settingsKeys, const
|
|||||||
if (settingsKeys.contains("rxDeviceName")) {
|
if (settingsKeys.contains("rxDeviceName")) {
|
||||||
m_rxDeviceName = settings.m_rxDeviceName;
|
m_rxDeviceName = settings.m_rxDeviceName;
|
||||||
}
|
}
|
||||||
|
if (settingsKeys.contains("rxSampleRate")) {
|
||||||
|
m_rxSampleRate = settings.m_rxSampleRate;
|
||||||
|
}
|
||||||
if (settingsKeys.contains("rxCenterFrequency")) {
|
if (settingsKeys.contains("rxCenterFrequency")) {
|
||||||
m_rxCenterFrequency = settings.m_rxCenterFrequency;
|
m_rxCenterFrequency = settings.m_rxCenterFrequency;
|
||||||
}
|
}
|
||||||
@ -282,6 +293,9 @@ void AudioCATSISOSettings::applySettings(const QStringList& settingsKeys, const
|
|||||||
if (settingsKeys.contains("txDeviceName")) {
|
if (settingsKeys.contains("txDeviceName")) {
|
||||||
m_txDeviceName = settings.m_txDeviceName;
|
m_txDeviceName = settings.m_txDeviceName;
|
||||||
}
|
}
|
||||||
|
if (settingsKeys.contains("txSampleRate")) {
|
||||||
|
m_txSampleRate = settings.m_txSampleRate;
|
||||||
|
}
|
||||||
if (settingsKeys.contains("txCenterFrequency")) {
|
if (settingsKeys.contains("txCenterFrequency")) {
|
||||||
m_txCenterFrequency = settings.m_txCenterFrequency;
|
m_txCenterFrequency = settings.m_txCenterFrequency;
|
||||||
}
|
}
|
||||||
@ -357,6 +371,9 @@ QString AudioCATSISOSettings::getDebugString(const QStringList& settingsKeys, bo
|
|||||||
if (settingsKeys.contains("rxDeviceName") || force) {
|
if (settingsKeys.contains("rxDeviceName") || force) {
|
||||||
ostr << " m_rxDeviceName: " << m_rxDeviceName.toStdString();
|
ostr << " m_rxDeviceName: " << m_rxDeviceName.toStdString();
|
||||||
}
|
}
|
||||||
|
if (settingsKeys.contains("rxSampleRate") || force) {
|
||||||
|
ostr << " m_rxSampleRate: " << m_rxSampleRate;
|
||||||
|
}
|
||||||
if (settingsKeys.contains("rxCenterFrequency") || force) {
|
if (settingsKeys.contains("rxCenterFrequency") || force) {
|
||||||
ostr << " m_rxCenterFrequency: " << m_rxCenterFrequency;
|
ostr << " m_rxCenterFrequency: " << m_rxCenterFrequency;
|
||||||
}
|
}
|
||||||
@ -382,6 +399,9 @@ QString AudioCATSISOSettings::getDebugString(const QStringList& settingsKeys, bo
|
|||||||
if (settingsKeys.contains("txDeviceName") || force) {
|
if (settingsKeys.contains("txDeviceName") || force) {
|
||||||
ostr << " m_txDeviceName: " << m_txDeviceName.toStdString();
|
ostr << " m_txDeviceName: " << m_txDeviceName.toStdString();
|
||||||
}
|
}
|
||||||
|
if (settingsKeys.contains("txSampleRate") || force) {
|
||||||
|
ostr << " m_txSampleRate: " << m_txSampleRate;
|
||||||
|
}
|
||||||
if (settingsKeys.contains("txCenterFrequency") || force) {
|
if (settingsKeys.contains("txCenterFrequency") || force) {
|
||||||
ostr << " m_txCenterFrequency: " << m_txCenterFrequency;
|
ostr << " m_txCenterFrequency: " << m_txCenterFrequency;
|
||||||
}
|
}
|
||||||
|
@ -113,6 +113,7 @@ public:
|
|||||||
bool m_pttSpectrumLink;
|
bool m_pttSpectrumLink;
|
||||||
|
|
||||||
QString m_rxDeviceName; // Including realm, as from getFullDeviceName below
|
QString m_rxDeviceName; // Including realm, as from getFullDeviceName below
|
||||||
|
int m_rxSampleRate; //!< Sample rate in Hz
|
||||||
IQMapping m_rxIQMapping;
|
IQMapping m_rxIQMapping;
|
||||||
unsigned int m_log2Decim;
|
unsigned int m_log2Decim;
|
||||||
fcPos_t m_fcPosRx;
|
fcPos_t m_fcPosRx;
|
||||||
@ -121,6 +122,7 @@ public:
|
|||||||
float m_rxVolume;
|
float m_rxVolume;
|
||||||
|
|
||||||
QString m_txDeviceName; // Including realm, as from getFullDeviceName below
|
QString m_txDeviceName; // Including realm, as from getFullDeviceName below
|
||||||
|
int m_txSampleRate; //!< Sample rate in Hz
|
||||||
IQMapping m_txIQMapping;
|
IQMapping m_txIQMapping;
|
||||||
int m_txVolume; //!< dB
|
int m_txVolume; //!< dB
|
||||||
|
|
||||||
|
@ -173,3 +173,11 @@ Use this toggle button to connect or disconnect the radio.
|
|||||||
* **grey**: idle (not connected)
|
* **grey**: idle (not connected)
|
||||||
* **green**: connected
|
* **green**: connected
|
||||||
* **red**: error
|
* **red**: error
|
||||||
|
|
||||||
|
<h3>26. Audio input (Rx) sample rate</h3>
|
||||||
|
|
||||||
|
Select sample rate among presumed supported audio device rates. Check the actual sample rate of your device before starting.
|
||||||
|
|
||||||
|
<h3>27. Audio output (Tx) sample rate</h3>
|
||||||
|
|
||||||
|
Select sample rate among presumed supported audio device rates. Check the actual sample rate of your device before starting.
|
||||||
|
@ -2582,10 +2582,16 @@ margin-bottom: 20px;
|
|||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
},
|
},
|
||||||
|
"rxSampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"txCenterFrequency" : {
|
"txCenterFrequency" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
},
|
},
|
||||||
|
"txSampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"transverterMode" : {
|
"transverterMode" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -59609,7 +59615,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2025-06-02T13:08:26.366+02:00
|
Generated 2025-07-01T22:00:12.093+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,9 +4,13 @@ AudioCATSISOSettings:
|
|||||||
rxCenterFrequency:
|
rxCenterFrequency:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
rxSampleRate:
|
||||||
|
type: integer
|
||||||
txCenterFrequency:
|
txCenterFrequency:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
txSampleRate:
|
||||||
|
type: integer
|
||||||
transverterMode:
|
transverterMode:
|
||||||
type: integer
|
type: integer
|
||||||
transverterDeltaFrequency:
|
transverterDeltaFrequency:
|
||||||
|
@ -4,9 +4,13 @@ AudioCATSISOSettings:
|
|||||||
rxCenterFrequency:
|
rxCenterFrequency:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
rxSampleRate:
|
||||||
|
type: integer
|
||||||
txCenterFrequency:
|
txCenterFrequency:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
txSampleRate:
|
||||||
|
type: integer
|
||||||
transverterMode:
|
transverterMode:
|
||||||
type: integer
|
type: integer
|
||||||
transverterDeltaFrequency:
|
transverterDeltaFrequency:
|
||||||
|
@ -2582,10 +2582,16 @@ margin-bottom: 20px;
|
|||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
},
|
},
|
||||||
|
"rxSampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"txCenterFrequency" : {
|
"txCenterFrequency" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
},
|
},
|
||||||
|
"txSampleRate" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
"transverterMode" : {
|
"transverterMode" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
@ -59609,7 +59615,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2025-06-02T13:08:26.366+02:00
|
Generated 2025-07-01T22:00:12.093+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,8 +30,12 @@ SWGAudioCATSISOSettings::SWGAudioCATSISOSettings(QString* json) {
|
|||||||
SWGAudioCATSISOSettings::SWGAudioCATSISOSettings() {
|
SWGAudioCATSISOSettings::SWGAudioCATSISOSettings() {
|
||||||
rx_center_frequency = 0L;
|
rx_center_frequency = 0L;
|
||||||
m_rx_center_frequency_isSet = false;
|
m_rx_center_frequency_isSet = false;
|
||||||
|
rx_sample_rate = 0;
|
||||||
|
m_rx_sample_rate_isSet = false;
|
||||||
tx_center_frequency = 0L;
|
tx_center_frequency = 0L;
|
||||||
m_tx_center_frequency_isSet = false;
|
m_tx_center_frequency_isSet = false;
|
||||||
|
tx_sample_rate = 0;
|
||||||
|
m_tx_sample_rate_isSet = false;
|
||||||
transverter_mode = 0;
|
transverter_mode = 0;
|
||||||
m_transverter_mode_isSet = false;
|
m_transverter_mode_isSet = false;
|
||||||
transverter_delta_frequency = 0L;
|
transverter_delta_frequency = 0L;
|
||||||
@ -96,8 +100,12 @@ void
|
|||||||
SWGAudioCATSISOSettings::init() {
|
SWGAudioCATSISOSettings::init() {
|
||||||
rx_center_frequency = 0L;
|
rx_center_frequency = 0L;
|
||||||
m_rx_center_frequency_isSet = false;
|
m_rx_center_frequency_isSet = false;
|
||||||
|
rx_sample_rate = 0;
|
||||||
|
m_rx_sample_rate_isSet = false;
|
||||||
tx_center_frequency = 0L;
|
tx_center_frequency = 0L;
|
||||||
m_tx_center_frequency_isSet = false;
|
m_tx_center_frequency_isSet = false;
|
||||||
|
tx_sample_rate = 0;
|
||||||
|
m_tx_sample_rate_isSet = false;
|
||||||
transverter_mode = 0;
|
transverter_mode = 0;
|
||||||
m_transverter_mode_isSet = false;
|
m_transverter_mode_isSet = false;
|
||||||
transverter_delta_frequency = 0L;
|
transverter_delta_frequency = 0L;
|
||||||
@ -163,6 +171,8 @@ SWGAudioCATSISOSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(rx_device_name != nullptr) {
|
if(rx_device_name != nullptr) {
|
||||||
delete rx_device_name;
|
delete rx_device_name;
|
||||||
}
|
}
|
||||||
@ -206,8 +216,12 @@ void
|
|||||||
SWGAudioCATSISOSettings::fromJsonObject(QJsonObject &pJson) {
|
SWGAudioCATSISOSettings::fromJsonObject(QJsonObject &pJson) {
|
||||||
::SWGSDRangel::setValue(&rx_center_frequency, pJson["rxCenterFrequency"], "qint64", "");
|
::SWGSDRangel::setValue(&rx_center_frequency, pJson["rxCenterFrequency"], "qint64", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&rx_sample_rate, pJson["rxSampleRate"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&tx_center_frequency, pJson["txCenterFrequency"], "qint64", "");
|
::SWGSDRangel::setValue(&tx_center_frequency, pJson["txCenterFrequency"], "qint64", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&tx_sample_rate, pJson["txSampleRate"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", "");
|
::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", "");
|
::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", "");
|
||||||
@ -281,9 +295,15 @@ SWGAudioCATSISOSettings::asJsonObject() {
|
|||||||
if(m_rx_center_frequency_isSet){
|
if(m_rx_center_frequency_isSet){
|
||||||
obj->insert("rxCenterFrequency", QJsonValue(rx_center_frequency));
|
obj->insert("rxCenterFrequency", QJsonValue(rx_center_frequency));
|
||||||
}
|
}
|
||||||
|
if(m_rx_sample_rate_isSet){
|
||||||
|
obj->insert("rxSampleRate", QJsonValue(rx_sample_rate));
|
||||||
|
}
|
||||||
if(m_tx_center_frequency_isSet){
|
if(m_tx_center_frequency_isSet){
|
||||||
obj->insert("txCenterFrequency", QJsonValue(tx_center_frequency));
|
obj->insert("txCenterFrequency", QJsonValue(tx_center_frequency));
|
||||||
}
|
}
|
||||||
|
if(m_tx_sample_rate_isSet){
|
||||||
|
obj->insert("txSampleRate", QJsonValue(tx_sample_rate));
|
||||||
|
}
|
||||||
if(m_transverter_mode_isSet){
|
if(m_transverter_mode_isSet){
|
||||||
obj->insert("transverterMode", QJsonValue(transverter_mode));
|
obj->insert("transverterMode", QJsonValue(transverter_mode));
|
||||||
}
|
}
|
||||||
@ -379,6 +399,16 @@ SWGAudioCATSISOSettings::setRxCenterFrequency(qint64 rx_center_frequency) {
|
|||||||
this->m_rx_center_frequency_isSet = true;
|
this->m_rx_center_frequency_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAudioCATSISOSettings::getRxSampleRate() {
|
||||||
|
return rx_sample_rate;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAudioCATSISOSettings::setRxSampleRate(qint32 rx_sample_rate) {
|
||||||
|
this->rx_sample_rate = rx_sample_rate;
|
||||||
|
this->m_rx_sample_rate_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGAudioCATSISOSettings::getTxCenterFrequency() {
|
SWGAudioCATSISOSettings::getTxCenterFrequency() {
|
||||||
return tx_center_frequency;
|
return tx_center_frequency;
|
||||||
@ -389,6 +419,16 @@ SWGAudioCATSISOSettings::setTxCenterFrequency(qint64 tx_center_frequency) {
|
|||||||
this->m_tx_center_frequency_isSet = true;
|
this->m_tx_center_frequency_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGAudioCATSISOSettings::getTxSampleRate() {
|
||||||
|
return tx_sample_rate;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGAudioCATSISOSettings::setTxSampleRate(qint32 tx_sample_rate) {
|
||||||
|
this->tx_sample_rate = tx_sample_rate;
|
||||||
|
this->m_tx_sample_rate_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGAudioCATSISOSettings::getTransverterMode() {
|
SWGAudioCATSISOSettings::getTransverterMode() {
|
||||||
return transverter_mode;
|
return transverter_mode;
|
||||||
@ -667,9 +707,15 @@ SWGAudioCATSISOSettings::isSet(){
|
|||||||
if(m_rx_center_frequency_isSet){
|
if(m_rx_center_frequency_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_rx_sample_rate_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_tx_center_frequency_isSet){
|
if(m_tx_center_frequency_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_tx_sample_rate_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_transverter_mode_isSet){
|
if(m_transverter_mode_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,15 @@ public:
|
|||||||
qint64 getRxCenterFrequency();
|
qint64 getRxCenterFrequency();
|
||||||
void setRxCenterFrequency(qint64 rx_center_frequency);
|
void setRxCenterFrequency(qint64 rx_center_frequency);
|
||||||
|
|
||||||
|
qint32 getRxSampleRate();
|
||||||
|
void setRxSampleRate(qint32 rx_sample_rate);
|
||||||
|
|
||||||
qint64 getTxCenterFrequency();
|
qint64 getTxCenterFrequency();
|
||||||
void setTxCenterFrequency(qint64 tx_center_frequency);
|
void setTxCenterFrequency(qint64 tx_center_frequency);
|
||||||
|
|
||||||
|
qint32 getTxSampleRate();
|
||||||
|
void setTxSampleRate(qint32 tx_sample_rate);
|
||||||
|
|
||||||
qint32 getTransverterMode();
|
qint32 getTransverterMode();
|
||||||
void setTransverterMode(qint32 transverter_mode);
|
void setTransverterMode(qint32 transverter_mode);
|
||||||
|
|
||||||
@ -136,9 +142,15 @@ private:
|
|||||||
qint64 rx_center_frequency;
|
qint64 rx_center_frequency;
|
||||||
bool m_rx_center_frequency_isSet;
|
bool m_rx_center_frequency_isSet;
|
||||||
|
|
||||||
|
qint32 rx_sample_rate;
|
||||||
|
bool m_rx_sample_rate_isSet;
|
||||||
|
|
||||||
qint64 tx_center_frequency;
|
qint64 tx_center_frequency;
|
||||||
bool m_tx_center_frequency_isSet;
|
bool m_tx_center_frequency_isSet;
|
||||||
|
|
||||||
|
qint32 tx_sample_rate;
|
||||||
|
bool m_tx_sample_rate_isSet;
|
||||||
|
|
||||||
qint32 transverter_mode;
|
qint32 transverter_mode;
|
||||||
bool m_transverter_mode_isSet;
|
bool m_transverter_mode_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user