omove works without crash

This commit is contained in:
gac-x06da
2025-01-27 18:27:09 +01:00
parent 4fc31e5f5d
commit 4b76d1b191
+13 -1
View File
@@ -99,9 +99,12 @@ class SmarGonSignalRO(Signal):
else:
self.put(r, force=True)
return self._readback
def poll(self, *args, **kwargs):
""" Fooo"""
time.sleep(2)
while True:
time.sleep(0.2)
self.get()
@@ -112,6 +115,8 @@ class SmarGonAxis(PVPositioner):
This class controls the SmarGon goniometer via the REST interface.
"""
USER_ACCESS = ["omove"]
# Status attributes
sg_url = Component(Signal, kind=Kind.config, metadata={"write_access": False})
corr = Component(SmarGonSignalRO, read_addr="corr_type", kind=Kind.config)
@@ -120,7 +125,7 @@ class SmarGonAxis(PVPositioner):
# Axis parameters
readback = Component(SmarGonSignalRO, kind=Kind.hinted, auto_monitor=True)
setpoint = Component(SmarGonSignal, kind=Kind.normal)
done = Component(SignalRO, value=1, kind=Kind.normal)
done = Component(Signal, value=1, kind=Kind.normal)
# moving = Component(SmarGonMovingSignalRO, kind=Kind.config)
moving = 1
_tol = 0.001
@@ -178,6 +183,13 @@ class SmarGonAxis(PVPositioner):
self.readback, on_target, timeout=timeout, settle_time=0.1
)
return status
def omove(self, position, wait=True, timeout=None, moved_cb=None):
""" Original move command without the BEC wrappers"""
return self.move(position, wait, timeout, moved_cb)
def _pos_changed(self, timestamp=None, value=None, **kwargs):
pass
def _go_n_get(self, address, **kwargs):
"""Helper function to connect to smargopolo"""