Commit d4234a37 authored by Yoann Sallaz Damaz's avatar Yoann Sallaz Damaz
Browse files

correct light disprecancy

parent fabe9404
Pipeline #61892 failed with stages
......@@ -100,3 +100,4 @@ ENV/
# mypy
.mypy_cache/
.favorites.json
bm07/videmono.txt
This diff is collapsed.
from bliss.controllers.motors.wago import WagoMotor
from bliss.controllers.motor import Controller
from bliss.common.utils import rounder
import gevent
class WagoMotor_FIP(WagoMotor, Controller):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def start_one(self, motion):
logical_name = motion.axis.config.get("logical_name")
logical_channel = int(motion.axis.config.get("logical_channel"))
tolerance = motion.axis.config.get("tolerance", float, 1e-2)
target_rounded = rounder(tolerance, motion.target_pos)
self.wago.controller.devwritephys(
(
self.wago.controller.devname2key(logical_name),
logical_channel,
motion.target_pos,
)
)
with gevent.Timeout(0.5, TimeoutError):
while rounder(tolerance, self.wago.get(logical_name)) != target_rounded:
gevent.sleep(0.1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment