forked from M-Labs/artiq
gui/moninj: fix datagram offset computation (#325)
This commit is contained in:
parent
a618a6d03a
commit
065cbfbb8a
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue