hackrf_sweep: suppress processing and output until the first expected frequency is seen
This commit is contained in:
@ -173,6 +173,7 @@ bool antenna = false;
|
||||
uint32_t antenna_enable;
|
||||
|
||||
bool binary_output = false;
|
||||
volatile bool sweep_started = false;
|
||||
|
||||
int fftSize = 20;
|
||||
uint32_t fft_bin_width;
|
||||
@ -216,6 +217,14 @@ int rx_callback(hackrf_transfer* transfer) {
|
||||
buf += SAMPLES_PER_BLOCK;
|
||||
break;
|
||||
}
|
||||
if(!sweep_started) {
|
||||
if (frequency == (uint64_t)(FREQ_ONE_MHZ*frequencies[0])) {
|
||||
sweep_started = true;
|
||||
} else {
|
||||
buf += SAMPLES_PER_BLOCK;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if((FREQ_MAX_MHZ * FREQ_ONE_MHZ) < frequency) {
|
||||
buf += SAMPLES_PER_BLOCK;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user