Skip to content

Commit

Permalink
Added "Waiting for sync" info in hackrf_transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Bartolucci authored and Marco Bartolucci committed May 22, 2017
1 parent e6a0161 commit 8d01877
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions host/hackrf-tools/src/hackrf_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,10 +1077,15 @@ int main(int argc, char** argv) {
byte_count_now = byte_count;
byte_count = 0;


time_difference = TimevalDiff(&time_now, &time_start);
rate = (float)byte_count_now / time_difference;
fprintf(stderr, "%4.1f MiB / %5.3f sec = %4.1f MiB/second\n",
(byte_count_now / 1e6f), time_difference, (rate / 1e6f) );
if (byte_count_now == 0 && hw_sync == true && hw_sync_enable != 0) {
fprintf(stderr, "Waiting for sync...\n");
} else {
fprintf(stderr, "%4.1f MiB / %5.3f sec = %4.1f MiB/second\n",
(byte_count_now / 1e6f), time_difference, (rate / 1e6f) );
}

time_start = time_now;

Expand Down

0 comments on commit 8d01877

Please sign in to comment.