mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-03-04 14:35:54 +01:00
hackrf_sweep: speed up ending by removing unnecessary code
hackrf_stop_rx() is handled in hackrf_close(), so there seems to be no need to call it separately. Furthermore, if hackrf_stop() is called separately, it causes hackrf_close() to take more than half a second longer.
This commit is contained in:
@@ -742,14 +742,6 @@ int main(int argc, char** argv) {
|
||||
sweep_count, time_diff, sweep_rate);
|
||||
|
||||
if(device != NULL) {
|
||||
result = hackrf_stop_rx(device);
|
||||
if(result != HACKRF_SUCCESS) {
|
||||
fprintf(stderr, "hackrf_stop_rx() failed: %s (%d)\n",
|
||||
hackrf_error_name(result), result);
|
||||
} else {
|
||||
fprintf(stderr, "hackrf_stop_rx() done\n");
|
||||
}
|
||||
|
||||
result = hackrf_close(device);
|
||||
if(result != HACKRF_SUCCESS) {
|
||||
fprintf(stderr, "hackrf_close() failed: %s (%d)\n",
|
||||
|
||||
Reference in New Issue
Block a user