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
ftws = struct.unpack(">" + "I"*ndds, dds_data)
for w in self.dm.dds_widgets.values():
offset = (dds_channels_per_bus*w.bus_channel
+ w.channel-dds_rtio_first_channel)
bus_nr = w.bus_channel - dds_rtio_first_channel
offset = dds_channels_per_bus*bus_nr + w.channel
try:
ftw = ftws[offset]
except KeyError: