From 52215f9ec18882887a8c210e47b8f5b95b1bda22 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Thu, 1 May 2025 08:52:30 +0200 Subject: [PATCH] dummy_cfg.py: add test case with big enum + fix undefined value in frappy_psi.ls370res.Switcher Change-Id: I59f2814b945533c487999f9af638e0fb2040e862 --- cfg/dummy_cfg.py | 26 ++++++++++++++++++++++++++ frappy_psi/ls370res.py | 1 + 2 files changed, 27 insertions(+) diff --git a/cfg/dummy_cfg.py b/cfg/dummy_cfg.py index 661c344..cf9d9b6 100644 --- a/cfg/dummy_cfg.py +++ b/cfg/dummy_cfg.py @@ -108,3 +108,29 @@ Mod('bool', 'frappy_demo.modules.BoolWritable', 'boolean writable test', ) + +Mod('lscom', + 'frappy_psi.ls370sim.Ls370Sim', + 'simulated serial communicator to a LS 370', + visibility = 3 +) + +Mod('sw', + 'frappy_psi.ls370res.Switcher', + 'channel switcher for Lsc controller', + io = 'lscom', +) + +Mod('a', + 'frappy_psi.ls370res.ResChannel', + 'resistivity', + channel = 1, + switcher = 'sw', +) + +Mod('b', + 'frappy_psi.ls370res.ResChannel', + 'resistivity', + channel = 3, + switcher = 'sw', +) diff --git a/frappy_psi/ls370res.py b/frappy_psi/ls370res.py index 1055953..14bb917 100644 --- a/frappy_psi/ls370res.py +++ b/frappy_psi/ls370res.py @@ -166,6 +166,7 @@ class Switcher(LakeShoreIO, ChannelSwitcher): def set_active_channel(self, chan): self.set_param('SCAN ', chan.channel, 0) + self.value = chan.channel chan._last_range_change = time.monotonic() self.set_delays(chan)