Remove liquid-dsp dependency for simplicity
This commit is contained in:
parent
83c39fabf2
commit
479a1f42e9
7 changed files with 13 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
all: testrpitx
|
||||
|
||||
CFLAGS = -Wall -g -O3 -Wno-unused-variable
|
||||
LDFLAGS = -lm -lrt -lpthread -lliquid
|
||||
LDFLAGS = -lm -lrt -lpthread
|
||||
CCP = g++
|
||||
CC = gcc
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ void SimpleTest(uint64_t Freq)
|
|||
|
||||
clkgpio clk;
|
||||
clk.print_clock_tree();
|
||||
//clk.SetPllNumber(clk_plld,2);
|
||||
clk.SetPllNumber(clk_plld,1);
|
||||
clk.SetAdvancedPllMode(true);
|
||||
clk.SetCenterFrequency(Freq,100000);
|
||||
int Deviation=0;
|
||||
|
@ -75,6 +75,7 @@ void SimpleTestDMA(uint64_t Freq)
|
|||
ngfmtest.stop();
|
||||
|
||||
}
|
||||
/*
|
||||
using std::complex;
|
||||
void SimpleTestLiquid()
|
||||
{
|
||||
|
@ -123,7 +124,7 @@ void SimpleTestLiquid()
|
|||
|
||||
ngfmtest.stop();
|
||||
}
|
||||
|
||||
*/
|
||||
void SimpleTestFileIQ(uint64_t Freq)
|
||||
{
|
||||
FILE *iqfile=NULL;
|
||||
|
@ -155,7 +156,7 @@ void SimpleTestFileIQ(uint64_t Freq)
|
|||
for(int i=0;i<nbread/2;i++)
|
||||
{
|
||||
|
||||
liquid_float_complex x=complex<float>(IQBuffer[i*2]/32768.0,IQBuffer[i*2+1]/32768.0);
|
||||
std::complex<float> x=std::complex<float>(IQBuffer[i*2]/32768.0,IQBuffer[i*2+1]/32768.0);
|
||||
iqtest.SetIQSample(Index+i,x);
|
||||
|
||||
}
|
||||
|
@ -392,8 +393,8 @@ int main(int argc, char* argv[])
|
|||
|
||||
//SimpleTest(Freq);
|
||||
//SimpleTestbpsk(Freq);
|
||||
//SimpleTestFileIQ(Freq);
|
||||
SimpleTestDMA(Freq);
|
||||
SimpleTestFileIQ(Freq);
|
||||
//SimpleTestDMA(Freq);
|
||||
//SimpleTestAm(Freq);
|
||||
//SimpleTestOOK(Freq);
|
||||
//SimpleTestBurstFsk(Freq);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
all: librpitx
|
||||
|
||||
CFLAGS = -Wall -O3 -Wno-unused-variable
|
||||
LDFLAGS = -lm -lrt -lpthread -lliquid
|
||||
LDFLAGS = -lm -lrt -lpthread
|
||||
CCP = g++
|
||||
CC = gcc
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ int dsp::arctan2(int y, int x) // Should be replaced with fast_atan2 from rtl_fm
|
|||
return (y < 0) ? -angle : angle; // negate if in quad III or IV
|
||||
}
|
||||
|
||||
void dsp::pushsample(liquid_float_complex sample)
|
||||
void dsp::pushsample(std::complex<float> sample)
|
||||
{
|
||||
|
||||
amplitude=norm(sample);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <complex>
|
||||
#include <liquid/liquid.h>
|
||||
|
||||
class dsp
|
||||
{
|
||||
protected:
|
||||
|
@ -25,7 +25,7 @@ class dsp
|
|||
|
||||
dsp();
|
||||
dsp(uint32_t samplerate);
|
||||
void pushsample(liquid_float_complex sample);
|
||||
void pushsample(std::complex<float> sample);
|
||||
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -134,7 +134,7 @@ void iqdmasync::SetDmaAlgo()
|
|||
}
|
||||
|
||||
|
||||
void iqdmasync::SetIQSample(uint32_t Index,liquid_float_complex sample)
|
||||
void iqdmasync::SetIQSample(uint32_t Index,std::complex<float> sample)
|
||||
{
|
||||
Index=Index%buffersize;
|
||||
mydsp.pushsample(sample);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "dma.h"
|
||||
#include "gpio.h"
|
||||
#include "dsp.h"
|
||||
#include <liquid/liquid.h>
|
||||
|
||||
|
||||
class iqdmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio
|
||||
|
@ -21,7 +20,7 @@ class iqdmasync:public bufferdma,public clkgpio,public pwmgpio,public pcmgpio
|
|||
void SetDmaAlgo();
|
||||
|
||||
void SetPhase(bool inversed);
|
||||
void SetIQSample(uint32_t Index,liquid_float_complex sample);
|
||||
void SetIQSample(uint32_t Index,std::complex<float> sample);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue