MLZ/entangle: fix AnalogOutput.read_status()
Change-Id: I584cd8f559b6c57f3c73105b28bc533526f6f492
This commit is contained in:
parent
aa98604f88
commit
355810a887
@ -28,8 +28,7 @@ Here we support devices which fulfill the official
|
||||
MLZ TANGO interface for the respective device classes.
|
||||
"""
|
||||
|
||||
# pylint: disable=too-many-lines
|
||||
|
||||
# pylint: disable=too-many-lines, consider-using-f-string
|
||||
|
||||
import re
|
||||
import threading
|
||||
@ -520,18 +519,18 @@ class AnalogOutput(PyTangoDevice, Drivable):
|
||||
return stable and at_target
|
||||
|
||||
def read_status(self):
|
||||
_st, _sts = super().read_status()
|
||||
if _st == Readable.Status.DISABLED:
|
||||
return _st, _sts
|
||||
status = super().read_status()
|
||||
if status[0] in (Readable.Status.DISABLED, Readable.Status.ERROR):
|
||||
self.setFastPoll(False)
|
||||
return status
|
||||
if self._isAtTarget():
|
||||
self._timeout = None
|
||||
self._moving = False
|
||||
status = super().read_status()
|
||||
else:
|
||||
if self._timeout and self._timeout < currenttime():
|
||||
status = self.Status.UNSTABLE, 'timeout after waiting for stable value'
|
||||
else:
|
||||
status = (self.Status.BUSY, 'moving') if self._moving else (self.Status.IDLE, 'stable')
|
||||
elif self._moving:
|
||||
status = (self.Status.BUSY, 'moving: ' + status[1])
|
||||
self.setFastPoll(self.isBusy(status))
|
||||
return status
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user