From a9d66c6a759515c7061e2e8aac661eeb0082ea1e Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Wed, 30 Dec 2015 19:20:20 +0000 Subject: More configurable sources. Move some math functions to core/math.h. Move delay filter from sdr_fm --- test/sdr_fm.c | 94 ++--------------------------------------------------------- 1 file changed, 3 insertions(+), 91 deletions(-) (limited to 'test/sdr_fm.c') diff --git a/test/sdr_fm.c b/test/sdr_fm.c index a7f5551..4fc4c98 100644 --- a/test/sdr_fm.c +++ b/test/sdr_fm.c @@ -8,8 +8,10 @@ #include +#include #include #include +#include #define SAMPLE_RATE 1000000 #define RESAMPLE_RATE 50000 @@ -149,99 +151,9 @@ uint8_t super_div20u8( uint16_t num ) return (uint8_t)r; } -void rotate_90(uint8_t *buf, uint32_t len) -/* 90 rotation is 1+0j, 0+1j, -1+0j, 0-1j - or [0, 1, -3, 2, -4, -5, 7, -6] */ -{ - uint32_t i; - uint8_t tmp; - for (i=0; i= n ) - { - cycle = 0; - } - - out1 = (avg_i - delay_i)/n; - out2 = (avg_q - delay_q)/n; - - buf[i] = out1; - buf[i+1] = out2; - - //printf("%d,avg=[%d,%d],delay=[%d,%d],in=[%d,%d],out=[%d,%d]\n", - // cycle, avg_i,avg_q,delay_i,delay_q,in1,in2,out1,out2); - - } -} int main( int argc, char **argv ) { @@ -334,7 +246,7 @@ int main( int argc, char **argv ) // fbuf[i] = to_float(sample_buf[i]); //} //delay boxed filter - delay_filt( sample_buf, sample_len ); + filt_delay( sample_buf, sample_len ); //rotate by 90 degrees uint8_t -- cgit v1.2.3