From 56e046c3390a15aab4baddb502a490bb4505942a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 14 Oct 2022 22:10:30 +0200 Subject: Rework timestamp_refresh Since we have the 'timestamp in the past' warning refresh requests can be lost --- src/output/SDR.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/output/SDR.cpp') diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp index 6078fc7..b0c09b6 100644 --- a/src/output/SDR.cpp +++ b/src/output/SDR.cpp @@ -2,7 +2,7 @@ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2018 + Copyright (C) 2022 Matthias P. Braendli, matthias.braendli@mpb.li http://opendigitalradio.org @@ -297,6 +297,10 @@ void SDR::handle_frame(struct FrameData& frame) return; } + if (frame.ts.offset_changed) { + m_device->require_timestamp_refresh(); + } + if (last_tx_time_initialised) { const size_t sizeIn = frame.buf.size() / sizeof(complexf); @@ -325,7 +329,7 @@ void SDR::handle_frame(struct FrameData& frame) tx_second << "+" << (double)tx_pps/16384000.0 << "(" << tx_pps << ")"; - frame.ts.timestamp_refresh = true; + m_device->require_timestamp_refresh(); } } -- cgit v1.2.3