umv based on ptpython
Closes #2955 (closed)
This PR rework every umv
s 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
frombliss.shell.standard
now supports adisplay_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
-
- It can be one of
-
umv
s commands are based on thismove
-
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
- It uses the default style from
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
Edited by Valentin Valls