fixes on 2023-11-27
- ls372 autorange: wait one sec. more for switching - keep only one channel, even after target is reached - intermediate target only when T is raise, but not when lowered
This commit is contained in:
@ -231,7 +231,7 @@ class ResChannel(Channel):
|
||||
def _read_value(self):
|
||||
"""read value, without update"""
|
||||
now = time.monotonic()
|
||||
if now + 0.5 < max(self._last_range_change, self.switcher._start_switch) + self.pause:
|
||||
if now - 0.5 < max(self._last_range_change, self.switcher._start_switch) + self.pause:
|
||||
return None
|
||||
result = float(self.communicate('RDGR?%d' % self.channel))
|
||||
if result == 0:
|
||||
@ -241,7 +241,7 @@ class ResChannel(Channel):
|
||||
return None
|
||||
if self.autorange:
|
||||
self.fix_autorange()
|
||||
if now + 0.5 > self._last_range_change + self.pause:
|
||||
if now - 0.5 > self._last_range_change + self.pause:
|
||||
rng = int(max(self.minrange, self.range)) # convert from enum to int
|
||||
if self.status[0] < self.Status.ERROR:
|
||||
if abs(result) > self.RES_SCALE[rng]:
|
||||
@ -386,6 +386,10 @@ class TemperatureLoop(HasConvergence, TemperatureChannel, Drivable):
|
||||
htrrng = Parameter('', EnumType(HTRRNG), readonly=False)
|
||||
_control_active = False
|
||||
|
||||
def doPoll(self):
|
||||
super().doPoll()
|
||||
self.set_htrrng()
|
||||
|
||||
@Command
|
||||
def control_off(self):
|
||||
"""switch control off"""
|
||||
|
Reference in New Issue
Block a user