From 30b2f54baa51a7498461f7a656481ab32bba6820 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 21 Jan 2019 18:11:41 +0800 Subject: [PATCH] kasli_tester: skip Zotino test when no Zotino is present --- .../kasli_basic/repository/kasli_tester.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/artiq/examples/kasli_basic/repository/kasli_tester.py b/artiq/examples/kasli_basic/repository/kasli_tester.py index e6ba1c68f..f86efe5a0 100644 --- a/artiq/examples/kasli_basic/repository/kasli_tester.py +++ b/artiq/examples/kasli_basic/repository/kasli_tester.py @@ -280,14 +280,15 @@ class KasliTester(EnvExperiment): zotino.load() def test_zotinos(self): - print("*** Testing Zotino DACs.") - print("Voltages:") - for card_n, (card_name, card_dev) in enumerate(self.zotinos): - voltages = [2*card_n + (-1)**i*0.1*(i//2+1) for i in range(32)] - print(card_name, " ".join(["{:.1f}".format(x) for x in voltages])) - self.set_zotino_voltages(card_dev, voltages) - print("Press ENTER when done.") - input() + if self.zotinos: + print("*** Testing Zotino DACs.") + print("Voltages:") + for card_n, (card_name, card_dev) in enumerate(self.zotinos): + voltages = [2*card_n + (-1)**i*0.1*(i//2+1) for i in range(32)] + print(card_name, " ".join(["{:.1f}".format(x) for x in voltages])) + self.set_zotino_voltages(card_dev, voltages) + print("Press ENTER when done.") + input() @kernel def grabber_capture(self, card_dev, rois):