hackrf_sweep: exit early from rx_callback if do_exit set
Sometimes, if a small frequency interval is scanned, the callback is triggered even though we already have the number of sweeps we want, and sweep_count gets increased, showing the wrong "Total sweeps".
This commit is contained in:
@ -220,6 +220,9 @@ int rx_callback(hackrf_transfer* transfer) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(do_exit) {
|
||||
return 0;
|
||||
}
|
||||
gettimeofday(&usb_transfer_time, NULL);
|
||||
byte_count += transfer->valid_length;
|
||||
buf = (int8_t*) transfer->buffer;
|
||||
|
Reference in New Issue
Block a user