diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index 7e97166e0..beac82d1c 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -347,6 +347,9 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); @@ -483,6 +486,19 @@ void AMModGUI::audioSelect() } } +void AMModGUI::audioFeedbackSelect() +{ + qDebug("AMModGUI::audioFeedbackSelect"); + AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.exec(); + + if (audioSelect.m_selected) + { + m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName; + applySettings(); + } +} + void AMModGUI::tick() { double powDb = CalcDb::dbPower(m_amMod->getMagSq()); diff --git a/plugins/channeltx/modam/ammodgui.h b/plugins/channeltx/modam/ammodgui.h index bfee39faf..2e03d76f0 100644 --- a/plugins/channeltx/modam/ammodgui.h +++ b/plugins/channeltx/modam/ammodgui.h @@ -115,6 +115,7 @@ private slots: void configureFileName(); void audioSelect(); + void audioFeedbackSelect(); void tick(); }; diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 1bbc62e5a..1a25d652d 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -520,7 +520,7 @@ void NFMMod::applyAudioSampleRate(int sampleRate) void NFMMod::applyFeedbackAudioSampleRate(unsigned int sampleRate) { - qDebug("AMMod::applyFeedbackAudioSampleRate: %u", sampleRate); + qDebug("NFMMod::applyFeedbackAudioSampleRate: %u", sampleRate); m_settingsMutex.lock(); @@ -993,7 +993,7 @@ void NFMMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettings) { SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); swgChannelSettings->setDirection(1); // single source (Tx) - swgChannelSettings->setChannelType(new QString("AMMod")); + swgChannelSettings->setChannelType(new QString("NFMMod")); swgChannelSettings->setNfmModSettings(new SWGSDRangel::SWGNFMModSettings()); SWGSDRangel::SWGNFMModSettings *swgNFModSettings = swgChannelSettings->getNfmModSettings(); diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index 169058501..4a2d988a6 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -375,6 +375,9 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); @@ -518,6 +521,19 @@ void NFMModGUI::audioSelect() } } +void NFMModGUI::audioFeedbackSelect() +{ + qDebug("NFMModGUI::audioFeedbackSelect"); + AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.exec(); + + if (audioSelect.m_selected) + { + m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName; + applySettings(); + } +} + void NFMModGUI::tick() { double powDb = CalcDb::dbPower(m_nfmMod->getMagSq()); diff --git a/plugins/channeltx/modnfm/nfmmodgui.h b/plugins/channeltx/modnfm/nfmmodgui.h index 085d9713d..699eb66ec 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.h +++ b/plugins/channeltx/modnfm/nfmmodgui.h @@ -118,6 +118,7 @@ private slots: void configureFileName(); void audioSelect(); + void audioFeedbackSelect(); void tick(); }; diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 841926260..e77c81cef 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -793,7 +793,7 @@ void SSBMod::applyAudioSampleRate(int sampleRate) void SSBMod::applyFeedbackAudioSampleRate(unsigned int sampleRate) { - qDebug("AMMod::applyFeedbackAudioSampleRate: %u", sampleRate); + qDebug("SSBMod::applyFeedbackAudioSampleRate: %u", sampleRate); m_settingsMutex.lock(); diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index 71aaba9ab..a8c31aedc 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -422,6 +422,9 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); @@ -722,6 +725,19 @@ void SSBModGUI::audioSelect() } } +void SSBModGUI::audioFeedbackSelect() +{ + qDebug("SSBModGUI::audioFeedbackSelect"); + AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.exec(); + + if (audioSelect.m_selected) + { + m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName; + applySettings(); + } +} + void SSBModGUI::tick() { double powDb = CalcDb::dbPower(m_ssbMod->getMagSq()); diff --git a/plugins/channeltx/modssb/ssbmodgui.h b/plugins/channeltx/modssb/ssbmodgui.h index e4a4e01f5..c8e0ae140 100644 --- a/plugins/channeltx/modssb/ssbmodgui.h +++ b/plugins/channeltx/modssb/ssbmodgui.h @@ -128,6 +128,7 @@ private slots: void configureFileName(); void audioSelect(); + void audioFeedbackSelect(); void tick(); };