Skip to content

Commit

Permalink
Merge 7093b19 into 047daf4
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian authored Apr 4, 2024
2 parents 047daf4 + 7093b19 commit f47a497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apstools/devices/positioner_soft_done.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,13 @@ def _setup_move(self, position):
kwargs["wait"] = True # Signal.put() warns if kwargs are given
self.target.put(position, **kwargs)
self.setpoint.put(position, wait=True)
self.done.put(not self.done_value) # TODO: confirm
if self.actuate is not None:
self.log.debug("%s.actuate = %s", self.name, self.actuate_value)
self.actuate.put(self.actuate_value, wait=False)
# This is needed because in a special case the setpoint.put does not
# run the "sub_value" subscriptions.
self.cb_setpoint()
self.cb_setpoint() # FIXME: review this code
self.cb_readback() # This is needed to force the first check.


Expand Down
5 changes: 1 addition & 4 deletions apstools/devices/tests/test_positioner_soft_done.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def test_structure(device, has_inposition):
assert pos.tolerance.get() == -1


@pytest.mark.local
def test_put_and_stop(rbv, prec, pos):
assert pos.tolerance.get() == -1
assert pos.precision == prec.get()
Expand All @@ -230,7 +229,7 @@ def motion(rb_initial, target, rb_mid=None):
# force a stop now
pos.stop()
pos.cb_readback()
assert pos.setpoint.get(use_monitor=False) == rb_mid
assert pos.setpoint.get(use_monitor=False) == rb_mid # FIXME: fails sometimes 1.0 == 0.5
assert pos.readback.get(use_monitor=False) == rb_mid
assert pos.position == rb_mid
else: # interrupted move
Expand All @@ -248,7 +247,6 @@ def motion(rb_initial, target, rb_mid=None):
motion(1, 0, 0.5) # interrupted move


@pytest.mark.local
def test_move_and_stop_nonzero(rbv, pos):
timed_pause()

Expand All @@ -271,7 +269,6 @@ def test_move_and_stop_nonzero(rbv, pos):
assert pos.inposition


@pytest.mark.local
def test_move_and_stopped_early(rbv, pos):
def motion(target, delay, interrupt=False):
timed_pause(0.1) # allow previous activities to settle down
Expand Down

0 comments on commit f47a497

Please sign in to comment.