mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-01 17:26:40 -04:00
Link FCD with libusb.
This commit is contained in:
parent
d93c2f8b14
commit
4d83ca105c
@ -21,6 +21,8 @@
|
|||||||
#include "lorademod.h"
|
#include "lorademod.h"
|
||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
|
|
||||||
|
//#include "lorabits.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message)
|
MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message)
|
||||||
|
|
||||||
LoRaDemod::LoRaDemod(SampleSink* sampleSink) :
|
LoRaDemod::LoRaDemod(SampleSink* sampleSink) :
|
||||||
@ -41,6 +43,8 @@ LoRaDemod::LoRaDemod(SampleSink* sampleSink) :
|
|||||||
|
|
||||||
loraFilter = new sfft(LORA_SFFT_LEN);
|
loraFilter = new sfft(LORA_SFFT_LEN);
|
||||||
negaFilter = new sfft(LORA_SFFT_LEN);
|
negaFilter = new sfft(LORA_SFFT_LEN);
|
||||||
|
|
||||||
|
//make_gray();
|
||||||
}
|
}
|
||||||
|
|
||||||
LoRaDemod::~LoRaDemod()
|
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));
|
Complex cangle(cos(M_PI*2*m_angle/SPREADFACTOR),-sin(M_PI*2*m_angle/SPREADFACTOR));
|
||||||
newangle = detect(ci, cangle);
|
newangle = detect(ci, cangle);
|
||||||
|
|
||||||
m_bin = (m_bin + newangle) & (2*LORA_SFFT_LEN - 1);
|
m_bin = (m_bin + newangle) & (LORA_SFFT_LEN - 1);
|
||||||
Complex nangle(cos(M_PI*m_bin/LORA_SFFT_LEN),sin(M_PI*m_bin/LORA_SFFT_LEN));
|
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_sampleBuffer.push_back(Sample(nangle.real() * 100, nangle.imag() * 100));
|
||||||
m_sampleDistanceRemain += (Real)m_sampleRate / m_Bandwidth;
|
m_sampleDistanceRemain += (Real)m_sampleRate / m_Bandwidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(m_sampleSink != NULL)
|
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()
|
void LoRaDemod::start()
|
||||||
|
@ -46,6 +46,7 @@ add_library(inputfcd SHARED
|
|||||||
|
|
||||||
target_link_libraries(inputfcd
|
target_link_libraries(inputfcd
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
|
${LIBUSB_LIBRARIES}
|
||||||
asound
|
asound
|
||||||
sdrbase
|
sdrbase
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user