ALBA-Synchrotron / sardana-icepap

IcePAP plugins for Sardana
GNU General Public License v3.0
0 stars 2 forks source link

Generate automatically MoveableOnInput #19

Closed ovallcorba closed 1 year ago

ovallcorba commented 1 year ago

This addition eliminates the need to specifically set the attribute MoveableOnInput when using the multiplexor mode (axis == 0). The pair motor_alias:axis will be generated automatically using the information from icepap.find_axes(). Now the user does not need to set this manually every time the scan motor changes.

ovallcorba commented 1 year ago

Hi!,

I merged with master to have the changes from: https://github.com/ALBA-Synchrotron/sardana-icepap/pull/20

Then, the automatic generation of MoveableOnInput works now as the following:

It is generated in AddDevice for axis 0, but only when no memorized value is available. It has been finally implemented like this (instead of preventing manual writting of the attribute) to allow also user input in case some protection is needed when setting the allowed motors for triggers. So now, if the value is set by the user, it will prevail over the automatic generation (until the memorized value is deleted).

This new feature of automatic generation will not work until the MoveableOnInput attribute is exposed to the controller layer (Sardana MR https://gitlab.com/sardana-org/sardana/-/merge_requests/1927). The new additions will not affect how the controller has been working up to now and when the feature becomes available, if the automatic generation wants to be used, the memorized value needs to be deleted.