forked from M-Labs/artiq
1
0
Fork 0

gui/moninj: fix datagram offset computation (#325)

This commit is contained in:
Sebastien Bourdeauducq 2016-03-10 22:34:22 +08:00
parent a618a6d03a
commit 065cbfbb8a
1 changed files with 2 additions and 2 deletions

View File

@ -296,8 +296,8 @@ class MonInj(TaskObject):
ndds = len(dds_data)//4 ndds = len(dds_data)//4
ftws = struct.unpack(">" + "I"*ndds, dds_data) ftws = struct.unpack(">" + "I"*ndds, dds_data)
for w in self.dm.dds_widgets.values(): for w in self.dm.dds_widgets.values():
offset = (dds_channels_per_bus*w.bus_channel bus_nr = w.bus_channel - dds_rtio_first_channel
+ w.channel-dds_rtio_first_channel) offset = dds_channels_per_bus*bus_nr + w.channel
try: try:
ftw = ftws[offset] ftw = ftws[offset]
except KeyError: except KeyError: