aboutsummaryrefslogtreecommitdiffstats
path: root/host/python/usrp.py
diff options
context:
space:
mode:
authoriprivit <41305661+iprivit@users.noreply.github.com>2019-10-28 13:58:11 -0400
committerMartin Braun <martin.braun@ettus.com>2019-11-13 14:07:15 -0800
commiteb448043a9d958fd87bc6494f67004a7c33851fb (patch)
tree7996fd68d73a02e861655d034cc79bc361e28e58 /host/python/usrp.py
parent21ed72b5a219c7d3d4cc87afa61410aff56f30a7 (diff)
downloaduhd-eb448043a9d958fd87bc6494f67004a7c33851fb.tar.gz
uhd-eb448043a9d958fd87bc6494f67004a7c33851fb.tar.bz2
uhd-eb448043a9d958fd87bc6494f67004a7c33851fb.zip
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.
Diffstat (limited to 'host/python/usrp.py')
-rw-r--r--host/python/usrp.py2
1 files changed, 1 insertions, 1 deletions
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