dummy_cfg.py: add test case with big enum

+ fix undefined value in frappy_psi.ls370res.Switcher

Change-Id: I59f2814b945533c487999f9af638e0fb2040e862
This commit is contained in:
zolliker 2025-05-01 08:52:30 +02:00
parent 58549065fb
commit 52215f9ec1
2 changed files with 27 additions and 0 deletions

View File

@ -108,3 +108,29 @@ Mod('bool',
'frappy_demo.modules.BoolWritable', 'frappy_demo.modules.BoolWritable',
'boolean writable test', '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',
)

View File

@ -166,6 +166,7 @@ class Switcher(LakeShoreIO, ChannelSwitcher):
def set_active_channel(self, chan): def set_active_channel(self, chan):
self.set_param('SCAN ', chan.channel, 0) self.set_param('SCAN ', chan.channel, 0)
self.value = chan.channel
chan._last_range_change = time.monotonic() chan._last_range_change = time.monotonic()
self.set_delays(chan) self.set_delays(chan)