Skip to content

Commit

Permalink
adding condition to reach target pymodaq>4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Sep 24, 2024
1 parent 14ab23c commit f152743
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f152743

Please sign in to comment.