bugfix: fix sync for oaisim

With the current implementation of oaisim
(rxdata and channel simulation), we cannot
call trx_read_func on a dummy buffer. The
code will actually modify the rxdata buffers
of the UE.

This is has to be rewritten properly. In the
meantime, let's introduce a simple hack. The
idea of the read at this point is to wait for
the synch to finish and not lose samples from
the hardware in the real UE. In the simulator,
as it is today, we can simply sleep until the
synch code has finished its work.
This commit is contained in:
Cedric Roux
2017-07-31 16:32:07 +02:00
parent 3ed32a77d0
commit 030a345258
+4
View File
@@ -698,6 +698,9 @@ void *UE_thread(void *arg) {
}
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), "");
} else {
#if OAISIM
usleep(500);
#else
// grab 10 ms of signal into dummy buffer
if (UE->mode != loop_through_memory) {
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
@@ -710,6 +713,7 @@ void *UE_thread(void *arg) {
UE->frame_parms.samples_per_tti,
UE->frame_parms.nb_antennas_rx);
}
#endif
}
} // UE->is_synchronized==0