From ac86efc30a3610a153eaadd354351155d3f8ba18 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Sun, 21 Apr 2024 21:05:07 -0700 Subject: [PATCH] yet another try to avoid startup sample rate error message --- rx888.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rx888.c b/rx888.c index 081e4a9c..ee415454 100644 --- a/rx888.c +++ b/rx888.c @@ -243,12 +243,12 @@ static void *proc_rx888(void *arg){ assert(sdr != NULL); pthread_setname("proc_rx888"); - int64_t const now = gps_time_ns(); - sdr->last_callback_time = now; - sdr->last_count_time = now; - realtime(); { + int64_t const now = gps_time_ns(); + sdr->last_callback_time = now; + sdr->last_count_time = now; + int ret __attribute__ ((unused)); ret = rx888_start_rx(sdr,rx_callback); assert(ret == 0); @@ -358,7 +358,7 @@ static void rx_callback(struct libusb_transfer * const transfer){ double const rate = BILLION * (double)sampcount / (now - sdr->last_count_time); double const error = fabs((rate - frontend->samprate) / (double)frontend->samprate); if(error > 0.01) - fprintf(stdout,"RX888 measured sample rate error: %.1lf Hz vs nominal %d Hz\n", + fprintf(stdout,"RX888 measured sample rate error: %'.1lf Hz vs nominal %'d Hz\n", rate,frontend->samprate); sdr->last_count_time = now; sdr->last_sample_count = frontend->samples;