mirror of
https://github.com/fairwaves/openbts-2.8.git
synced 2025-11-02 04:53:13 +00:00
umtrx: flush any possible garbage bursts at start
In certain cases (higher sample-per-symbol counts), there is some sensitivity to either timeouts or bad metadata on the first packet. The first packet sets the transceiver clock, so this is essential. As a workaround, drop the first 50 packets to guarantee that we get a packet with a valid timestamp Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
committed by
Alexander Chemeris
parent
1bcd01c7c5
commit
be809f6803
@@ -552,11 +552,13 @@ void uhd_device::restart(uhd::time_spec_t ts)
|
||||
uhd::rx_metadata_t md;
|
||||
uint32_t buff[rx_spp];
|
||||
|
||||
usrp_dev->get_device()->recv(buff,
|
||||
rx_spp,
|
||||
md,
|
||||
uhd::io_type_t::COMPLEX_INT16,
|
||||
uhd::device::RECV_MODE_ONE_PACKET);
|
||||
for (int i = 0; i < 50; i++) {
|
||||
usrp_dev->get_device()->recv(buff,
|
||||
rx_spp,
|
||||
md,
|
||||
uhd::io_type_t::COMPLEX_INT16,
|
||||
uhd::device::RECV_MODE_ONE_PACKET);
|
||||
}
|
||||
|
||||
init_rd_ts = convert_time(md.time_spec, actual_smpl_rt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user