diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/.gitignore | 2 | ||||
-rw-r--r-- | test/Makefile | 4 | ||||
-rw-r--r-- | test/ui_gl_waterfall.c | 19 |
3 files changed, 17 insertions, 8 deletions
diff --git a/test/.gitignore b/test/.gitignore index 41c1670..7bd96c4 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -5,4 +5,6 @@ ui_gl_waterfall get_audo_list ui_gl_fm ui_gl_filter +sdr_fm +div20 *.o diff --git a/test/Makefile b/test/Makefile index a8160e8..05714ae 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,5 +1,5 @@ CC=gcc -CFLAGS=-I../ +CFLAGS=-I../ #LDFLAGS= `pkg-config --libs libusb` -L../../../r820t -lr820t -Wl,-rpath=../../../r820t LDFLAGS=`pkg-config --libs libusb` `sdl2-config --cflags --libs` -lrtlsdr -lm ../radiola.o -lasound SOURCE = $(wildcard *.c) @@ -16,4 +16,4 @@ BIN = $(SOURCE:.c=) make: $(BIN) clean: - rm -f $(BIN)
\ No newline at end of file + rm -f $(BIN) diff --git a/test/ui_gl_waterfall.c b/test/ui_gl_waterfall.c index 6227808..72dec46 100644 --- a/test/ui_gl_waterfall.c +++ b/test/ui_gl_waterfall.c @@ -192,7 +192,7 @@ int simple_fft( uint8_t *buf, int len ) int main( int argc, char **argv ) { - + int ret; int i,j; int c; uint8_t *buf, *sample_buf; @@ -244,7 +244,7 @@ int main( int argc, char **argv ) if ( (sdr = sdr_init()) == NULL ) - { + { printf("Cannot init sdr manager\n"); sdr = NULL; goto main_exit; @@ -257,8 +257,15 @@ int main( int argc, char **argv ) goto main_exit; } dongle = sdr_get_device_id( sdr, config_device ); - dongle_set_freq( dongle, config_freq ); - dongle_set_sample_rate( dongle, config_sample_rate ); + ret = 0; + ret != dongle_set_freq( dongle, config_freq ); + ret != dongle_set_sample_rate( dongle, config_sample_rate ); + ret != dongle_set_gain( dongle, 0 ); + ret != dongle_set_agc( dongle, 40 ); + if (ret != 0) + { + printf("Cannot properly config device\n"); + } sine_table( FFT_LEVEL ); @@ -318,8 +325,8 @@ int main( int argc, char **argv ) main_exit: //close gui, restore terminal mode - //glui_close( t ); - //sdr_close( sdr ); + glui_close( t ); + sdr_close( sdr ); return 0; }
\ No newline at end of file |