1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-07 17:16:02 -05:00

AM modulator: fixed frequency shift control sequence

This commit is contained in:
f4exb 2017-10-11 00:47:51 +02:00
parent d1c14be67f
commit ccb2f7ff96
2 changed files with 18 additions and 3 deletions

View File

@ -275,6 +275,20 @@ bool AMMod::handleMessage(const Message& cmd)
return true;
}
else if (MsgConfigureChannelizer::match(cmd))
{
MsgConfigureChannelizer& cfg = (MsgConfigureChannelizer&) cmd;
m_channelizer->configure(m_channelizer->getInputMessageQueue(),
cfg.getSampleRate(),
cfg.getCenterFrequency());
qDebug() << "AMMod::handleMessage: MsgConfigureChannelizer:"
<< " getSampleRate: " << cfg.getSampleRate()
<< " getCenterFrequency: " << cfg.getCenterFrequency();
return true;
}
else if (MsgConfigureAMMod::match(cmd))
{
MsgConfigureAMMod& cfg = (MsgConfigureAMMod&) cmd;
@ -415,4 +429,6 @@ void AMMod::applySettings(const AMModSettings& settings, bool force)
m_cwKeyer.setSampleRate(settings.m_audioSampleRate);
m_cwSmoother.setNbFadeSamples(settings.m_audioSampleRate / 250); // 4 ms
}
m_settings = settings;
}

View File

@ -132,7 +132,7 @@ void AMModGUI::handleSourceMessages()
void AMModGUI::on_deltaFrequency_changed(qint64 value)
{
m_channelMarker.setCenterFrequency(value);
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
m_settings.m_inputFrequencyOffset = value;
applySettings();
}
@ -345,8 +345,7 @@ void AMModGUI::applySettings(bool force __attribute((unused)))
setTitleColor(m_channelMarker.getColor());
AMMod::MsgConfigureChannelizer *msgConfigure = AMMod::MsgConfigureChannelizer::create(
48000,
m_channelMarker.getCenterFrequency());
48000, m_channelMarker.getCenterFrequency());
m_amMod->getInputMessageQueue()->push(msgConfigure);
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());