You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DS402: Minimize side-effects of operation mode switching (ref #244) (#251)
* ds402: Keep target values on operation mode change.
As the comment already stated, clearing the target values should
possibly happen before switching to the OPERATION ENABLED state, to
avoid unexpected movements. So doing that when actually leaving that
state is mostly useless.
Some legitimate use cases even require switching the operation mode
while in OPERATION ENABLED, e.g. switching between Profile Position
and Profile Velocity. This change does not allow that, but at the
very least will avoid the need to reset target values again.
* ds402: Keep power state on operation mode change.
Some legitimate use cases require switching the operation mode while
in OPERATION ENABLED, e.g. switching between Profile Position and
Profile Velocity.
If an application or specific controller needs the transition from
OPERATION ENABLED to SWITCHED ON during operation mode changes, that
should be handled outside this library, and is easy enough to do. On
the other hand, having it inside the op_mode setter prevents the above
mentioned use-case.
* ds402: Improve logging in op_mode setter.
Do not generate a log message about the changed operation mode when it
actually failed. Use a consistent style for the TypeError message
formatting.
0 commit comments