mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-04 15:02:25 -04:00
SDRdaemon: update device center frequency and channel sample rate in channel sink
This commit is contained in:
parent
3021181564
commit
22b5f7fdde
@ -28,6 +28,7 @@
|
|||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "dsp/threadedbasebandsamplesink.h"
|
#include "dsp/threadedbasebandsamplesink.h"
|
||||||
#include "dsp/downchannelizer.h"
|
#include "dsp/downchannelizer.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "device/devicesourceapi.h"
|
#include "device/devicesourceapi.h"
|
||||||
#include "channel/sdrdaemonchannelsinkthread.h"
|
#include "channel/sdrdaemonchannelsinkthread.h"
|
||||||
#include "sdrdaemonchannelsink.h"
|
#include "sdrdaemonchannelsink.h"
|
||||||
@ -205,7 +206,36 @@ void SDRDaemonChannelSink::stop()
|
|||||||
|
|
||||||
bool SDRDaemonChannelSink::handleMessage(const Message& cmd __attribute__((unused)))
|
bool SDRDaemonChannelSink::handleMessage(const Message& cmd __attribute__((unused)))
|
||||||
{
|
{
|
||||||
|
if (DownChannelizer::MsgChannelizerNotification::match(cmd))
|
||||||
|
{
|
||||||
|
DownChannelizer::MsgChannelizerNotification& notif = (DownChannelizer::MsgChannelizerNotification&) cmd;
|
||||||
|
|
||||||
|
qDebug() << "SDRDaemonChannelSink::handleMessage: MsgChannelizerNotification:"
|
||||||
|
<< " channelSampleRate: " << notif.getSampleRate()
|
||||||
|
<< " offsetFrequency: " << notif.getFrequencyOffset();
|
||||||
|
|
||||||
|
if (notif.getSampleRate() > 0) {
|
||||||
|
setSampleRate(notif.getSampleRate());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (DSPSignalNotification::match(cmd))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
|
||||||
|
|
||||||
|
qDebug() << "SDRDaemonChannelSink::handleMessage: DSPSignalNotification:"
|
||||||
|
<< " inputSampleRate: " << notif.getSampleRate()
|
||||||
|
<< " centerFrequency: " << notif.getCenterFrequency();
|
||||||
|
|
||||||
|
setCenterFrequency(notif.getCenterFrequency());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray SDRDaemonChannelSink::serialize() const
|
QByteArray SDRDaemonChannelSink::serialize() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user