Skip to content

Commit

Permalink
Merge pull request greatscottgadgets#402 from mokipcs/master
Browse files Browse the repository at this point in the history
Fixed a time_stamp bug in rx_callback()
  • Loading branch information
dominicgs authored Aug 23, 2017
2 parents 97d3e65 + 161d8f7 commit 687c72f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion host/hackrf-tools/src/hackrf_sweep.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ int rx_callback(hackrf_transfer* transfer) {
(uint64_t)(num_samples + THROWAWAY_BLOCKS * SAMPLES_PER_BLOCK)
* j * FREQ_ONE_MHZ / DEFAULT_SAMPLE_RATE_HZ;
if(999999 < time_stamp.tv_usec) {
time_stamp.tv_usec = time_stamp.tv_usec % 1000000;
time_stamp.tv_sec += time_stamp.tv_usec / 1000000;
time_stamp.tv_usec = time_stamp.tv_usec % 1000000;
}
}
if(do_exit) {
Expand Down

0 comments on commit 687c72f

Please sign in to comment.