secop_mlz: minor rework entangle client

Change-Id: Ie406b4220c22cdbf302a1fd36f2d7407d81a47fa
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/28951
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Enrico Faulhaber 2022-08-02 11:54:53 +02:00 committed by Markus Zolliker
parent de5f17695c
commit 0df50bb0f9

View File

@ -28,6 +28,9 @@ Here we support devices which fulfill the official
MLZ TANGO interface for the respective device classes.
"""
# pylint: disable=too-many-lines
import re
import threading
from time import sleep
@ -173,7 +176,7 @@ class PyTangoDevice(Module):
tango_status_mapping = {
PyTango.DevState.ON: Drivable.Status.IDLE,
PyTango.DevState.ALARM: Drivable.Status.WARN,
PyTango.DevState.OFF: Drivable.Status.ERROR,
PyTango.DevState.OFF: Drivable.Status.DISABLED,
PyTango.DevState.FAULT: Drivable.Status.ERROR,
PyTango.DevState.MOVING: Drivable.Status.BUSY,
}
@ -504,6 +507,9 @@ 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
if self._isAtTarget():
self._timeout = None
self._moving = False