Skip to content

umv based on ptpython

Valentin Valls requested to merge umv-ptpython into master

Closes #2955 (closed)

This PR rework every umvs functions with a prompt toolkit application.

The rational is to display every which have to be refreshed with a prompt toolkit application in order to properly handle line wrap.

This will also allow to display the logs happening during the motion without breaking the display of the motion.

  • move from bliss.shell.standard now supports a display_mode parameter and can be used to display or not the motion live
    • It can be one of
      • auto: Use a live monitoring display if possible only, else print at start of the motion
      • print: Only display print at the start of the motion
      • no: Do not display anything
  • umvs commands are based on this move
  • bliss.shell.pt.umove provides a pt application to move motors and display the actual motor state
    • It uses the default style from bliss.shell.pt.default_style

Tested with

sx.limits = 0, 100
sy.acceleration = 1
sx.acceleration = 10
if sx.position == 0:
    umv(sx, 100, sy, 1.1, sz, 1.2, roby, 0.3, robx, 1.4, slit_vertical_offset, 0)
else:
    umv(sx, 0, sy, 0.7, sz, 0.8, roby, 1.9, robx, 0.6, slit_vertical_offset, 0.1)

Here is an example with an abort

umove

Edited by Valentin Valls

Merge request reports