Skip to content

Commit

Permalink
use the motor signal movement_finished() to update the Axis control d…
Browse files Browse the repository at this point in the history
…isplays
  • Loading branch information
rocco8773 committed Oct 21, 2024
1 parent 343a641 commit ab38ef9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bapsf_motion/gui/configure/motion_group_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def link_axis(self, mg: MotionGroup, ax_index: int):

self.axis_name_label.setText(self.axis.name)
self.axis.motor.status_changed.connect(self._update_display_of_axis_status)
self.axis.motor.movement_finished.connect(self._update_display_of_axis_status)
self._update_display_of_axis_status()

self.axisLinked.emit()
Expand All @@ -263,6 +264,9 @@ def unlink_axis(self):
if self.axis is not None:
# self.axis.terminate(delay_loop_stop=True)
self.axis.motor.status_changed.disconnect(self._update_display_of_axis_status)
self.axis.motor.movement_finished.disconnect(
self._update_display_of_axis_status
)

self._mg = None
self._axis_index = None
Expand Down

0 comments on commit ab38ef9

Please sign in to comment.