From a1c97ec4dded4f41d36e0f86a542402e422bb62c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 7 May 2019 16:58:00 +0800 Subject: [PATCH] kasli_tester: support selection of TTL output to use as stimulus --- artiq/examples/kasli_basic/repository/kasli_tester.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/artiq/examples/kasli_basic/repository/kasli_tester.py b/artiq/examples/kasli_basic/repository/kasli_tester.py index fecc6e21d..f2d10765e 100644 --- a/artiq/examples/kasli_basic/repository/kasli_tester.py +++ b/artiq/examples/kasli_basic/repository/kasli_tester.py @@ -170,7 +170,13 @@ class KasliTester(EnvExperiment): if not self.ttl_outs: print("No TTL output channel available to use as stimulus.") return - ttl_out_name, ttl_out_dev = next(iter(self.ttl_outs)) + default_ttl_out_name, default_ttl_out_dev = next(iter(self.ttl_outs)) + ttl_out_name = input("TTL device to use as stimulus (default: {}): ".format(default_ttl_out_name)) + if ttl_out_name: + ttl_out_dev = self.get_device(ttl_out_name) + else: + ttl_out_name = default_ttl_out_name + ttl_out_dev = default_ttl_out_dev for ttl_in_name, ttl_in_dev in self.ttl_ins: print("Connect {} to {}. Press ENTER when done." .format(ttl_out_name, ttl_in_name))