mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-09 10:35:21 +02:00
added invert iq option
This commit is contained in:
@ -31,10 +31,12 @@ void IQFrontEnd::init(dsp::stream<dsp::complex_t>* in, double sampleRate, bool b
|
||||
|
||||
decim.init(NULL, _decimRatio);
|
||||
dcBlock.init(NULL, genDCBlockRate(effectiveSr));
|
||||
conjugate.init(NULL);
|
||||
|
||||
preproc.init(&inBuf.out);
|
||||
preproc.addBlock(&decim, _decimRatio > 1);
|
||||
preproc.addBlock(&dcBlock, dcBlocking);
|
||||
preproc.addBlock(&conjugate, false); // TODO: Replace by parameter
|
||||
|
||||
split.init(preproc.out);
|
||||
|
||||
@ -123,6 +125,10 @@ void IQFrontEnd::setDCBlocking(bool enabled) {
|
||||
preproc.setBlockEnabled(&dcBlock, enabled, [=](dsp::stream<dsp::complex_t>* out){ split.setInput(out); });
|
||||
}
|
||||
|
||||
void IQFrontEnd::setInvertIQ(bool enabled) {
|
||||
preproc.setBlockEnabled(&conjugate, enabled, [=](dsp::stream<dsp::complex_t>* out){ split.setInput(out); });
|
||||
}
|
||||
|
||||
void IQFrontEnd::bindIQStream(dsp::stream<dsp::complex_t>* stream) {
|
||||
split.bindStream(stream);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "../dsp/routing/splitter.h"
|
||||
#include "../dsp/channel/rx_vfo.h"
|
||||
#include "../dsp/sink/handler_sink.h"
|
||||
#include "../dsp/math/conjugate.h"
|
||||
#include <fftw3.h>
|
||||
|
||||
class IQFrontEnd {
|
||||
@ -27,6 +28,7 @@ public:
|
||||
|
||||
void setBuffering(bool enabled);
|
||||
void setDecimation(int ratio);
|
||||
void setInvertIQ(bool enabled);
|
||||
void setDCBlocking(bool enabled);
|
||||
|
||||
void bindIQStream(dsp::stream<dsp::complex_t>* stream);
|
||||
@ -65,6 +67,7 @@ protected:
|
||||
|
||||
// Pre-processing chain
|
||||
dsp::multirate::PowerDecimator<dsp::complex_t> decim;
|
||||
dsp::math::Conjugate conjugate;
|
||||
dsp::correction::DCBlocker<dsp::complex_t> dcBlock;
|
||||
dsp::chain<dsp::complex_t> preproc;
|
||||
|
||||
|
Reference in New Issue
Block a user