mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-19 06:41:47 -05:00
Merge branch 'master' into dev
This commit is contained in:
commit
e2a357440a
@ -684,17 +684,6 @@ void SSBMod::applyAudioSampleRate(int sampleRate)
|
|||||||
float lowCutoff = m_settings.m_lowCutoff;
|
float lowCutoff = m_settings.m_lowCutoff;
|
||||||
bool usb = m_settings.m_usb;
|
bool usb = m_settings.m_usb;
|
||||||
|
|
||||||
if (band < 0) // negative means LSB
|
|
||||||
{
|
|
||||||
band = -band; // turn to positive
|
|
||||||
lowCutoff = -lowCutoff;
|
|
||||||
usb = false; // and take note of side band
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
usb = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (band < 100.0f) // at least 100 Hz
|
if (band < 100.0f) // at least 100 Hz
|
||||||
{
|
{
|
||||||
band = 100.0f;
|
band = 100.0f;
|
||||||
@ -838,17 +827,6 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force)
|
|||||||
if ((settings.m_bandwidth != m_settings.m_bandwidth) ||
|
if ((settings.m_bandwidth != m_settings.m_bandwidth) ||
|
||||||
(settings.m_lowCutoff != m_settings.m_lowCutoff) || force)
|
(settings.m_lowCutoff != m_settings.m_lowCutoff) || force)
|
||||||
{
|
{
|
||||||
if (band < 0) // negative means LSB
|
|
||||||
{
|
|
||||||
band = -band; // turn to positive
|
|
||||||
lowCutoff = -lowCutoff;
|
|
||||||
usb = false; // and take note of side band
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
usb = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (band < 100.0f) // at least 100 Hz
|
if (band < 100.0f) // at least 100 Hz
|
||||||
{
|
{
|
||||||
band = 100.0f;
|
band = 100.0f;
|
||||||
|
@ -120,8 +120,14 @@ bool SSBModGUI::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (SSBMod::MsgConfigureSSBMod::match(message))
|
else if (SSBMod::MsgConfigureSSBMod::match(message))
|
||||||
{
|
{
|
||||||
|
SSBModSettings mod_settings; // different USB/LSB convention between modulator and GUI
|
||||||
const SSBMod::MsgConfigureSSBMod& cfg = (SSBMod::MsgConfigureSSBMod&) message;
|
const SSBMod::MsgConfigureSSBMod& cfg = (SSBMod::MsgConfigureSSBMod&) message;
|
||||||
m_settings = cfg.getSettings();
|
mod_settings = cfg.getSettings();
|
||||||
|
if (mod_settings.m_usb == false) {
|
||||||
|
mod_settings.m_bandwidth = -mod_settings.m_bandwidth;
|
||||||
|
mod_settings.m_lowCutoff = -mod_settings.m_lowCutoff;
|
||||||
|
}
|
||||||
|
m_settings = mod_settings;
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
@ -497,7 +503,17 @@ void SSBModGUI::applySettings(bool force)
|
|||||||
48000, m_settings.m_inputFrequencyOffset);
|
48000, m_settings.m_inputFrequencyOffset);
|
||||||
m_ssbMod->getInputMessageQueue()->push(msgChan);
|
m_ssbMod->getInputMessageQueue()->push(msgChan);
|
||||||
|
|
||||||
SSBMod::MsgConfigureSSBMod *msg = SSBMod::MsgConfigureSSBMod::create(m_settings, force);
|
SSBModSettings mod_settings; // different USB/LSB convention between modulator and GUI
|
||||||
|
mod_settings = m_settings;
|
||||||
|
if (mod_settings.m_bandwidth > 0) {
|
||||||
|
mod_settings.m_usb = true;
|
||||||
|
} else {
|
||||||
|
mod_settings.m_bandwidth = -mod_settings.m_bandwidth;
|
||||||
|
mod_settings.m_lowCutoff = -mod_settings.m_lowCutoff;
|
||||||
|
mod_settings.m_usb = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
SSBMod::MsgConfigureSSBMod *msg = SSBMod::MsgConfigureSSBMod::create(mod_settings, force);
|
||||||
m_ssbMod->getInputMessageQueue()->push(msg);
|
m_ssbMod->getInputMessageQueue()->push(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user