From 53789ba9aa2c73d7222e653118fba84947e6a3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 14 Jun 2019 10:54:00 +0000 Subject: [PATCH] tester: handle urukul switch differences --- artiq/examples/kasli/repository/kasli_tester.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/artiq/examples/kasli/repository/kasli_tester.py b/artiq/examples/kasli/repository/kasli_tester.py index 617cf08f0..b5398ea17 100644 --- a/artiq/examples/kasli/repository/kasli_tester.py +++ b/artiq/examples/kasli/repository/kasli_tester.py @@ -209,10 +209,12 @@ class KasliTester(EnvExperiment): channel.set_att(6.) @kernel - def rf_switch_wave(self, channels): + def cfg_sw_off_urukul(self, channel): self.core.break_realtime() - for channel in channels: - channel.cfg_sw(0) + channel.cfg_sw(0) + + @kernel + def rf_switch_wave(self, channels): while not is_enter_pressed(): self.core.break_realtime() # do not fill the FIFOs too much to avoid long response times @@ -260,10 +262,12 @@ class KasliTester(EnvExperiment): print("Press ENTER when done.") input() - sw = [channel_dev.sw for channel_name, channel_dev in self.urukuls if hasattr(channel_dev, "sw")] + sw = [channel_dev for channel_name, channel_dev in self.urukuls if hasattr(channel_dev, "sw")] if sw: print("Testing RF switch control. Press ENTER when done.") - self.rf_switch_wave(sw) + for swi in sw: + self.cfg_sw_off_urukul(swi) + self.rf_switch_wave([swi.sw for swi in sw]) @kernel def get_sampler_voltages(self, sampler, cb):