Open dschick opened 3 years ago
Hi, making this "general-purpose controller" more generic makes sense to me ;-D I guess with just few properties you can make the controller fit your needs and may help somebody else in the future
just made a PR #10 works as expected for me. One would need to agree on how the handle the encoder threshold
Hi,
we are heavily using this great sardana-tango driver in our lab but noticed an issue with the
TangoAttrMotorCtrl
when determining the state of the motor.As written in the
StateOne()
method initially thequality
of the attribute is checked. In our self-written tango DS we only change the State of the tango DS from 'DevState.ONto
DevState.MOVING`. I hoped that the attribute quality is adapted automatically, but it does not.So as fallback, the
TangoAttrMotorCtrl
then checks the current position and the set position with the correspondingthreshold
value. This of course requires a bit of overhead, as our tango DS does report the State already by itself.I was wondering what would be the best way to adapt the
TangoAttrMotorCtrl
or our Tango DS? As I understand it, I would need to change theattribute.qualitiy()
by myself in the TangoDS? I would like to avoid that and instead ask then for theState
of the TangoDS in theTangoAttrMotorCtrl
.My idea would be the following sequence:
attribute.quality
threshold
is set:threshold
is zero (or better negative) it is neglectedthreshold
is >(=) 0 the current and set positions are comparedState
of the TangoDS will be directly usedlet me know what you think of this.
Best
Daniel