Skip to content

Commit

Permalink
HackRF code example fix
Browse files Browse the repository at this point in the history
Getting rid of 100k entries before receiving was doing nothing.
  • Loading branch information
tadas-s committed Dec 8, 2024
1 parent 3f76bee commit 3a8f7d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/hackrf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ After running the code below, if in your time plot, the samples are reaching the
return 0
samples = samples[100000:] # get rid of the first 100k samples just to be safe, due to transients
sdr.set_rx_callback(rx_callback)
sdr.pyhackrf_start_rx()
print('is_streaming', sdr.pyhackrf_is_streaming())
Expand All @@ -236,6 +234,8 @@ After running the code below, if in your time plot, the samples are reaching the
sdr.pyhackrf_stop_rx()
sdr.pyhackrf_close()
samples = samples[100000:] # get rid of the first 100k samples just to be safe, due to transients
fft_size = 2048
num_rows = len(samples) // fft_size
spectrogram = np.zeros((num_rows, fft_size))
Expand Down

0 comments on commit 3a8f7d4

Please sign in to comment.