Skip to content

Commit

Permalink
remove contingency_wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
rerpha committed Dec 2, 2024
1 parent f2243a9 commit 0bb4c64
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions manual_system_tests/continuous_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def _inner() -> Generator[Msg, None, None]:

@run_decorator(md={})
def polling_plan():
yield from bps.clear_checkpoint()
yield from bps.create()
reading = yield from bps.read(bob)
yield from bps.read(alice)
Expand All @@ -100,9 +101,6 @@ def polling_plan():
# start the ramp
status = yield from bps.abs_set(bob, dave, wait=False)
while not status.done:
yield from bps.checkpoint()
yield from bps.clear_checkpoint()

yield from bps.create()
new_reading = yield from bps.read(bob)
yield from bps.read(alice)
Expand All @@ -115,13 +113,11 @@ def polling_plan():

# take a 'post' data point
yield from trigger_and_read([bob, alice])
yield from bps.checkpoint()

return (yield from polling_plan())

def _stop_motor(e):
yield from bps.stop(bob)

yield from contingency_wrapper(_inner(), except_plan=_stop_motor)
yield from _inner()


if __name__ == "__main__" and not os.environ.get("FROM_IBEX") == "True":
Expand Down

0 comments on commit 0bb4c64

Please sign in to comment.