temporary state at PPMS as of 2024-01-26

This commit is contained in:
l_samenv
2024-01-29 08:29:25 +01:00
parent 416cdd5a88
commit a930dc8f6a
6 changed files with 311 additions and 124 deletions

View File

@ -124,6 +124,7 @@ class Switcher(LakeShoreIO, ChannelSwitcher):
raise ValueError('no channels enabled')
self.write_target(channelno)
chan = self.channels.get(self.value)
self.value = channelno
chan.read_autorange()
chan.fix_autorange() # check for toggled autorange button
return Done
@ -228,7 +229,7 @@ class ResChannel(LakeShoreIO, Channel):
now = time.monotonic()
if now + 0.5 < max(self._last_range_change, self.switcher._start_switch) + self.pause:
return None
result = self.get_param(f'RDGR{self.channel}')
result = self.get_param(f'RDGR?{self.channel}')
if self.autorange:
self.fix_autorange()
if now + 0.5 > self._last_range_change + self.pause:
@ -252,7 +253,7 @@ class ResChannel(LakeShoreIO, Channel):
def read_value(self):
if self.channel == self.switcher.value == self.switcher.target:
value = self._read_value()
value = self.get_value()
if value is not None:
return value
return self.value # return previous value
@ -265,7 +266,7 @@ class ResChannel(LakeShoreIO, Channel):
@CommonReadHandler(rdgrng_params)
def read_rdgrng(self):
iscur, exc, rng, autorange, excoff = self.get_param(f'RDGRNG{self.channel}')
iscur, exc, rng, autorange, excoff = self.get_param(f'RDGRNG?{self.channel}')
self._prev_rdgrng = iscur, exc
if autorange: # pressed autorange button
if not self._toggle_autorange: