From eb448043a9d958fd87bc6494f67004a7c33851fb Mon Sep 17 00:00:00 2001 From: iprivit <41305661+iprivit@users.noreply.github.com> Date: Mon, 28 Oct 2019 13:58:11 -0400 Subject: python: MultiUSRP: Fix send_waveforms() The send_waveform() function takes the waveform_proto array and if it has only 1 channel, explicitly reshapes it to be (1, waveform_proto.size), or uses np.tile to replicate the waveform_proto array over X channels. It then proceeds to loop over the waveform_proto array, but attempts to do so over the channel dimension instead of looping over the actual samples. This results in sending the entire waveform_proto array regardless of the duration specified. The fix is to specify the dimension in which it crops, and not crop in dimension of the channels. --- host/python/usrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/python/usrp.py') diff --git a/host/python/usrp.py b/host/python/usrp.py index 803b45b1e..ce141d683 100644 --- a/host/python/usrp.py +++ b/host/python/usrp.py @@ -116,7 +116,7 @@ class MultiUSRP(lib.usrp.multi_usrp): while send_samps < max_samps: real_samps = min(proto_len, max_samps-send_samps) if real_samps < proto_len: - samples = streamer.send(waveform_proto[:real_samps], metadata) + samples = streamer.send(waveform_proto[:, :real_samps], metadata) else: samples = streamer.send(waveform_proto, metadata) send_samps += samples -- cgit v1.2.3