From 02cceee997db4267dfcd1b38493fbc529a1a9198 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 28 May 2021 09:27:13 +0200 Subject: [PATCH] rf_zmq_imp: revert 28399dd876e7c1a9ac0d0c8beaed9867086c2f90 and fix unit although the manual test with Amarisoft eNB worked fine it seems the delay is still needed in the default case. Over 50% of the tests failed in the nightly with: [zmq] Error: tx time is 0.067 ms in the past (138240 < 139776) [zmq] Error: tx time is 1.100 ms in the past (184320 < 209664) While this usleep() should increase the pass likelihood it still doesn't guarantee error-free runs, so we might need to revisit it again as some stage. --- lib/src/phy/rf/rf_zmq_imp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/phy/rf/rf_zmq_imp.c b/lib/src/phy/rf/rf_zmq_imp.c index bae0cf24f..793c0862b 100644 --- a/lib/src/phy/rf/rf_zmq_imp.c +++ b/lib/src/phy/rf/rf_zmq_imp.c @@ -668,6 +668,9 @@ int rf_zmq_recv_with_time_multi(void* h, void** data, uint32_t nsamples, bool bl rf_zmq_info(handler->id, " - next rx time: %d + %.3f\n", ts_rx.full_secs, ts_rx.frac_secs); rf_zmq_info(handler->id, " - next tx time: %d + %.3f\n", ts_tx.full_secs, ts_tx.frac_secs); + // Leave time for the Tx to transmit + usleep((1000000UL * nsamples_baserate) / handler->base_srate); + // check for tx gap if we're also transmitting on this radio for (int i = 0; i < handler->nof_channels; i++) { if (handler->transmitter[i].running) {