-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create util for caching positions before a plan and returning to them afterwards #653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very useful but I'm not 100% convinced about the API, I think with a minor tweak which in some ways is simpler it could be more useful still
src/dodal/plans/motor_util_plans.py
Outdated
def home_and_reset_wrapper( | ||
plan: MsgGenerator, | ||
device: Device, | ||
home_position: float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we likely to ever have this not be 0, and if it is ever not 0 isn't it then likely to be different for every motor?
how would you feel about this instead taking a list of motors, and a list of homes or default to 0 for everything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #653 +/- ##
==========================================
+ Coverage 94.16% 94.24% +0.07%
==========================================
Files 108 110 +2
Lines 4305 4360 +55
==========================================
+ Hits 4054 4109 +55
Misses 251 251 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
… afterwards (#653) * Added wrapper to home and reset to cache, also moved patch_motor to more easily accessible place * Made the API for the caching and moving wrapper more generic
Fixes DiamondLightSource/hyperion#1439
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}