diff --git a/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py b/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py index 4499bb4..ad77c8c 100644 --- a/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py +++ b/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py @@ -74,6 +74,24 @@ def get_actuator_value(self): pos = self.get_position_with_scaling(pos) return pos + def condition_to_reach_target(self) -> bool: + """ Implement the condition for exiting the polling mechanism and specifying that the + target value has been reached + + Could be reimplemented to implement other conditions + + Returns + ------- + bool: if True, PyMoDAQ considers the target value has been reached + """ + # TODO either delete this method if the usual polling is fine with you, but if need you can + # add here some other condition to be fullfilled either a completely new one or + # using or/and operations between the epsilon_bool and some other custom booleans + # for a usage example see DAQ_Move_brushlessMotor from the Thorlabs plugin + epsilon_bool = super().condition_to_reach_target() + + return epsilon_bool + def close(self): """Terminate the communication protocol""" ## TODO for your custom plugin