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