mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-03-09 16:59:08 +01:00
firmware: clean up transceiver modes
This commit is contained in:
committed by
Mike Walters
parent
43e6f99fe8
commit
c0aed2edb7
@@ -664,13 +664,6 @@ int main(int argc, char** argv) {
|
||||
ifftwPlan = fftwf_plan_dft_1d(fftSize * step_count, ifftwIn, ifftwOut, FFTW_BACKWARD, FFTW_MEASURE);
|
||||
}
|
||||
|
||||
result |= hackrf_start_rx(device, rx_callback, NULL);
|
||||
if (result != HACKRF_SUCCESS) {
|
||||
fprintf(stderr, "hackrf_start_rx() failed: %s (%d)\n", hackrf_error_name(result), result);
|
||||
usage();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
result = hackrf_init_sweep(device, frequencies, num_ranges, num_samples * 2,
|
||||
TUNE_STEP * FREQ_ONE_MHZ, OFFSET, INTERLEAVED);
|
||||
if( result != HACKRF_SUCCESS ) {
|
||||
@@ -679,6 +672,13 @@ int main(int argc, char** argv) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
result |= hackrf_start_rx_sweep(device, rx_callback, NULL);
|
||||
if (result != HACKRF_SUCCESS) {
|
||||
fprintf(stderr, "hackrf_start_rx_sweep() failed: %s (%d)\n", hackrf_error_name(result), result);
|
||||
usage();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (amp) {
|
||||
fprintf(stderr, "call hackrf_set_amp_enable(%u)\n", amp_enable);
|
||||
result = hackrf_set_amp_enable(device, (uint8_t)amp_enable);
|
||||
|
||||
Reference in New Issue
Block a user