aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-10-14 21:50:24 +0100
committerFreeArtMan <dos21h@gmail.com>2015-10-14 21:50:24 +0100
commit64ee55d5069534f3951bf5a194014ebfb79a4e81 (patch)
tree39be9002863c2d22d6b18f70f351d2a7408704a3
parent79ffedda826191f06aa837e9767cf7114a13282c (diff)
downloadradiola-64ee55d5069534f3951bf5a194014ebfb79a4e81.tar.gz
radiola-64ee55d5069534f3951bf5a194014ebfb79a4e81.zip
Small fixes
-rw-r--r--test/.gitignore2
-rw-r--r--test/Makefile4
-rw-r--r--test/ui_gl_waterfall.c19
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