This repository was archived by the owner on Nov 3, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
as discussed yesterday in the follow-up meeting, I am already trying to refector parts of the macros for movements based on #1480
However, I just noticed that besides moving the
hints
to the new base classMoveMacro
which then inherits fromMacro
andHookable
there is not much to refractor, since we do not define what actually happens in the move-macros, e.g. which underlying macro is called.So
umv
callsmv
butumvr
callsumv
and so on. And we can also not define that for any new Macros which developers/users will come up.As I see it, it is most "effort" to hand the
hooks
to the finalmv
macro, which currenlty requiresinstead of
self.executeMacro('umv', motor_pos_list)
Regarding the
self.motors
one could ask about that from the called macro, right?So refering to the line above, one could add at the end:
self.motors = mv.motors
As @reszelaz mentioned in his comment
self.motors
will be provided by themv
macro in thepre-move
andpost-move
hooks.We agreed to stil implement this property for all move macros for consistency.
But should it be available already in the
prepare
or in therun
method?I have move the filling of
self.motors
in themv
macro already into itsprepare
method.So any ideas how to simplify this further?