From 8d0187770a0d94c018e8c6d655d0c31feabb120a Mon Sep 17 00:00:00 2001 From: Marco Bartolucci Date: Mon, 22 May 2017 11:29:37 +0200 Subject: [PATCH] Added "Waiting for sync" info in hackrf_transfer --- host/hackrf-tools/src/hackrf_transfer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index 7f4d5ee5..0cf88b42 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -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;