From 4d83ca105cdc03acab199af447e5d2b43ef55b7e Mon Sep 17 00:00:00 2001 From: John Greb Date: Thu, 15 Jan 2015 10:57:05 +0000 Subject: [PATCH] Link FCD with libusb. --- plugins/channel/lora/lorademod.cpp | 10 +++++++--- plugins/samplesource/fcd/CMakeLists.txt | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/channel/lora/lorademod.cpp b/plugins/channel/lora/lorademod.cpp index 5c869d5b2..f10dca46e 100644 --- a/plugins/channel/lora/lorademod.cpp +++ b/plugins/channel/lora/lorademod.cpp @@ -21,6 +21,8 @@ #include "lorademod.h" #include "dsp/dspcommands.h" +//#include "lorabits.h" + MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message) LoRaDemod::LoRaDemod(SampleSink* sampleSink) : @@ -41,6 +43,8 @@ LoRaDemod::LoRaDemod(SampleSink* sampleSink) : loraFilter = new sfft(LORA_SFFT_LEN); negaFilter = new sfft(LORA_SFFT_LEN); + + //make_gray(); } LoRaDemod::~LoRaDemod() @@ -104,14 +108,14 @@ void LoRaDemod::feed(SampleVector::const_iterator begin, SampleVector::const_ite Complex cangle(cos(M_PI*2*m_angle/SPREADFACTOR),-sin(M_PI*2*m_angle/SPREADFACTOR)); newangle = detect(ci, cangle); - m_bin = (m_bin + newangle) & (2*LORA_SFFT_LEN - 1); - Complex nangle(cos(M_PI*m_bin/LORA_SFFT_LEN),sin(M_PI*m_bin/LORA_SFFT_LEN)); + m_bin = (m_bin + newangle) & (LORA_SFFT_LEN - 1); + Complex nangle(cos(M_PI*2*m_bin/LORA_SFFT_LEN),sin(M_PI*2*m_bin/LORA_SFFT_LEN)); m_sampleBuffer.push_back(Sample(nangle.real() * 100, nangle.imag() * 100)); m_sampleDistanceRemain += (Real)m_sampleRate / m_Bandwidth; } } if(m_sampleSink != NULL) - m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), true); + m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), false); } void LoRaDemod::start() diff --git a/plugins/samplesource/fcd/CMakeLists.txt b/plugins/samplesource/fcd/CMakeLists.txt index dc93be3b3..c31357e9f 100644 --- a/plugins/samplesource/fcd/CMakeLists.txt +++ b/plugins/samplesource/fcd/CMakeLists.txt @@ -46,6 +46,7 @@ add_library(inputfcd SHARED target_link_libraries(inputfcd ${QT_LIBRARIES} + ${LIBUSB_LIBRARIES} asound sdrbase )