Skip to content

Commit

Permalink
Update daq_move_Template.py
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Sep 24, 2024
1 parent f152743 commit 3df013f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 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,23 +74,19 @@ 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
def user_condition_to_reach_target(self) -> bool:
""" Implement a condition for exiting the polling mechanism and specifying that the
target value has been reached
Could be reimplemented to implement other conditions
Returns
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
# 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
return True

def close(self):
"""Terminate the communication protocol"""
Expand Down

0 comments on commit 3df013f

Please sign in to comment.