Skip to content

multipleposition: Rework events to handle motions from slaves

Valentin Valls requested to merge rework-multiposition-move into master

The multipleposition does not support events on state and position properly

  • When a motion is involved directly in the controller a work around was designed (f24cc6da).
  • This work around put pressure on our API, and does not solves every situations.
  • For instance, if the slaves are invoked directly, events are not propagated (see test_multiple_positions_channels_from_slave).

This PR initially aim to remove _umove from multipleposition in order to relax our API.

This for, event from positioners have to be propagated by the controller itself (using events).

The side consequence is that the test can be simplified, because their should not have difference between motion requested from or outside the shell.

Changes

  • Cleanup of the documentation and typing
  • Fixes of wrong use of log functions
  • Use events and gevent
  • Sequential + wait=False also works (previously it was not working)
  • If you move a positioner manually state and position will be updated
  • No more need of groups, standard mv/umv are used

Notes

  • wait() now returns a TimeoutError (see the tests)
  • wait() behave like before, it stops the motion at timeout, i think it is not a very common behavior, i would prefer not to do that, if it's fine for you? What to do at timeout is the responsibility of the caller i think.
    • It's in fact the behavior of the wait on a BLISS axis, so it's consistent

FYI @sfisher @beteva

Edited by Valentin Valls

Merge request reports