code cleanup

This commit is contained in:
Michael Ossmann
2017-02-07 21:11:50 -07:00
parent c68aedef31
commit 5ab315a73a

View File

@ -1,6 +1,7 @@
/* /*
* Copyright 2016 Dominic Spill <dominicgs@gmail.com> * Copyright 2016 Dominic Spill <dominicgs@gmail.com>
* Copyright 2016 Mike Walters <mike@flomp.net> * Copyright 2016 Mike Walters <mike@flomp.net>
* Copyright 2017 Michael Ossmann <mike@ossmann.com>
* *
* This file is part of HackRF. * This file is part of HackRF.
* *
@ -193,18 +194,16 @@ float logPower(fftwf_complex in, float scale)
} }
int rx_callback(hackrf_transfer* transfer) { int rx_callback(hackrf_transfer* transfer) {
/* This is where we need to do interesting things with the samples
* FFT
* Throw away unused bins
* write output to pipe
*/
int8_t* buf; int8_t* buf;
uint8_t* ubuf; uint8_t* ubuf;
uint64_t frequency; /* in Hz */ uint64_t frequency; /* in Hz */
float float_freq; float float_freq;
int i, j; int i, j;
if( fd != NULL ) { if(NULL == fd) {
return -1;
}
byte_count += transfer->valid_length; byte_count += transfer->valid_length;
buf = (int8_t*) transfer->buffer; buf = (int8_t*) transfer->buffer;
for(j=0; j<BLOCKS_PER_TRANSFER; j++) { for(j=0; j<BLOCKS_PER_TRANSFER; j++) {
@ -268,9 +267,6 @@ int rx_callback(hackrf_transfer* transfer) {
} }
} }
return 0; return 0;
} else {
return -1;
}
} }
static void usage() { static void usage() {