gui: Don't show more than the 64 working channels in moninj

Previously, you could irreversibly set the override since
the gateware part would accept commands for the higher channels,
but of coure not report back the results.

See GitHub #601.

Signed-off-by: David Nadlinger <code@klickverbot.at>
This commit is contained in:
David Nadlinger 2016-11-04 14:36:43 +00:00 committed by Sébastien Bourdeauducq
parent 29e3333467
commit 4e03f7ab0a
1 changed files with 4 additions and 0 deletions

View File

@ -207,6 +207,10 @@ class _DeviceManager:
widget = None
if v["module"] == "artiq.coredevice.ttl":
channel = v["arguments"]["channel"]
if channel > 63:
# The moninj protocol is limited to 64 channels; ignore
# any beyond that for now to avoid confusion.
return
force_out = v["class"] == "TTLOut"
widget = _TTLWidget(
channel, self.send_to_device, force_out, k)