fixed off-by-one error in hackrf_sweep again

This commit is contained in:
Michael Ossmann
2017-02-03 17:48:16 -07:00
parent bb350dccc0
commit 586082e3e5

View File

@ -235,7 +235,7 @@ int rx_callback(hackrf_transfer* transfer) {
strftime(time_str, 50, "%Y-%m-%d, %H:%M:%S", fft_time);
printf("%s, %" PRIu64 ", %" PRIu64 ", %f, %d, ",
time_str,
(uint64_t)((FREQ_ONE_MHZ*frequency)+1-STEP_SIZE_IN_HZ*(FFT_SIZE/2)),
(uint64_t)((FREQ_ONE_MHZ*frequency)-STEP_SIZE_IN_HZ*((FFT_SIZE/2)-1)),
(uint64_t)((FREQ_ONE_MHZ*frequency)+STEP_SIZE_IN_HZ*(FFT_SIZE/2)),
(float)STEP_SIZE_IN_HZ,
FFT_SIZE);