From d69ee8f1bc73bc6bfa352b48ff0c9f3b8144c21c Mon Sep 17 00:00:00 2001 From: maffettone Date: Wed, 3 Jan 2024 10:14:40 -0800 Subject: [PATCH] fix: use the get method directly --- nslsii/motors/delta_tau.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nslsii/motors/delta_tau.py b/nslsii/motors/delta_tau.py index a872a724..b7e477c5 100644 --- a/nslsii/motors/delta_tau.py +++ b/nslsii/motors/delta_tau.py @@ -6,7 +6,6 @@ from ophyd import Component as Cpt from ophyd import Device, EpicsSignal, EpicsSignalRO, Kind -from ophyd.utils.epics_pvs import raise_if_disconnected class PMACStatus(EpicsSignalRO): @@ -14,10 +13,8 @@ class PMACStatus(EpicsSignalRO): A signal to read the status of the PMAC-PC controller by checking the bit 11 of the status register. """ - @raise_if_disconnected - def read(self): - value = self.get() >> 11 & 1 == 0 - return {self.name: {"value": value, "timestamp": self.timestamp}} + def get(self): + return int(super().get() >> 11 & 1 == 0) class PMACKillSwitch(Device): @@ -40,3 +37,9 @@ def set(self, value, *args, **kwargs): ) value = 1 self.kill.set(value, *args, **kwargs) + + def get(self, *args, **kwargs): + """ + Get the value of the kill switch + """ + return self.status.get(*args, **kwargs)