Usrp constant and slow derive timestamp

Co-authored-by: Thomas Schlichter <thomas.schlichter@iis.fraunhofer.de>
This commit is contained in:
Laurent THOMAS
2025-01-23 10:22:31 +01:00
committed by Robert Schmidt
co-authored by Thomas Schlichter
parent 10e07bc67f
commit eac35f07a5
+2 -2
View File
@@ -222,7 +222,7 @@ static void writerProcessWaitingQueue(openair0_device *device)
if (wroteSamples != nsamps) if (wroteSamples != nsamps)
LOG_E(HW, "Failed to write to rf\n"); LOG_E(HW, "Failed to write to rf\n");
} }
ctx->nextTS += nsamps; ctx->nextTS = timestamp + nsamps;
pthread_mutex_lock(&ctx->mutex_store); pthread_mutex_lock(&ctx->mutex_store);
} }
} }
@@ -253,7 +253,7 @@ int openair0_write_reorder(openair0_device *device, openair0_timestamp timestamp
wroteSamples = device->trx_write_func(device, timestamp, txp, nsamps, nbAnt, flags); wroteSamples = device->trx_write_func(device, timestamp, txp, nsamps, nbAnt, flags);
else else
wroteSamples = nsamps; wroteSamples = nsamps;
ctx->nextTS += nsamps; ctx->nextTS = timestamp + nsamps;
} else { } else {
writerEnqueue(ctx, timestamp, txp, nsamps, nbAnt, flags); writerEnqueue(ctx, timestamp, txp, nsamps, nbAnt, flags);