Commit 362b17a8 authored by bliss administrator's avatar bliss administrator
Browse files

Undulators steps_position_precision

parent a1ab2e80
Pipeline #73178 failed
......@@ -66,23 +66,25 @@ class ID26_Undulator(ESRF_Undulator):
def start_one(self, motion, t0=None):
if motion.target_pos != pytest.approx(motion.axis.position, abs=motion.axis.tolerance):
self._set_attribute(
motion.axis,
"attr_pos_name",
float(motion.target_pos / motion.axis.steps_per_unit),
)
else:
log_warning(self,
"{0} within tolerance {1}: {2} (requested new pos id: {3})".format(
motion.axis.name,
motion.axis.tolerance,
motion.axis.position,
motion.target_pos,
)
)
log_debug(self, f"end of start {motion.axis.name}")
log_warning(self, f"{motion.axis.name}: moving from {motion.axis.position} to {motion.target_pos}")
return super().start_one(motion)
#if motion.target_pos != pytest.approx(motion.axis.position, abs=motion.axis.tolerance):
# self._set_attribute(
# motion.axis,
# "attr_pos_name",
# float(motion.target_pos / motion.axis.steps_per_unit),
# )
#else:
# log_warning(self,
# "{0} within tolerance {1}: {2} (requested new pos id: {3})".format(
# motion.axis.name,
# motion.axis.tolerance,
# motion.axis.position,
# motion.target_pos,
# )
# )
#
#log_debug(self, f"end of start {motion.axis.name}")
@_log_devfailed
def _set_attribute(self, *args):
......@@ -108,3 +110,6 @@ class ID26_Undulator(ESRF_Undulator):
def stop_all(self, *motion_list):
return ESRF_Undulator.stop_all(self, *motion_list)
def steps_position_precision(self, axis):
return 0.02
Supports Markdown
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