diff --git a/host/hackrf-tools/src/hackrf_sweep.c b/host/hackrf-tools/src/hackrf_sweep.c index 6a9d0f19..31a02b45 100644 --- a/host/hackrf-tools/src/hackrf_sweep.c +++ b/host/hackrf-tools/src/hackrf_sweep.c @@ -98,13 +98,14 @@ int gettimeofday(struct timeval *tv, void* ignored) { #define TUNE_STEP (DEFAULT_SAMPLE_RATE_HZ / FREQ_ONE_MHZ) #define OFFSET 7500000 -#define DEFAULT_SAMPLE_COUNT 0x2000 #define BLOCKS_PER_TRANSFER 16 +#define THROWAWAY_BLOCKS 2 #if defined _WIN32 #define sleep(a) Sleep( (a*1000) ) #endif +uint32_t num_samples = SAMPLES_PER_BLOCK; int num_ranges = 0; uint16_t frequencies[MAX_SWEEP_RANGES*2]; @@ -202,11 +203,13 @@ int rx_callback(hackrf_transfer* transfer) { int i, j; struct tm *fft_time; char time_str[50]; + struct timeval usb_transfer_time; if(NULL == fd) { return -1; } + gettimeofday(&usb_transfer_time, NULL); byte_count += transfer->valid_length; buf = (int8_t*) transfer->buffer; for(j=0; j