diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-10-14 21:50:24 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-10-14 21:50:24 +0100 |
commit | 64ee55d5069534f3951bf5a194014ebfb79a4e81 (patch) | |
tree | 39be9002863c2d22d6b18f70f351d2a7408704a3 /test/ui_gl_waterfall.c | |
parent | 79ffedda826191f06aa837e9767cf7114a13282c (diff) | |
download | radiola-64ee55d5069534f3951bf5a194014ebfb79a4e81.tar.gz radiola-64ee55d5069534f3951bf5a194014ebfb79a4e81.zip |
Small fixes
Diffstat (limited to 'test/ui_gl_waterfall.c')
-rw-r--r-- | test/ui_gl_waterfall.c | 19 |
1 files changed, 13 insertions, 6 deletions
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 |