-
Notifications
You must be signed in to change notification settings - Fork 1
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
Get mirror immediate position #743
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #743 +/- ##
==========================================
+ Coverage 86.87% 86.90% +0.03%
==========================================
Files 69 69
Lines 3557 3551 -6
==========================================
- Hits 3090 3086 -4
+ Misses 467 465 -2 ☔ 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.
I've made one suggestion about the test, but it otherwise looks good. Thanks for doing this!
I think it's fine to leave DummyStepperMotor
as it is for now -- let's not make things hard for ourselves.
I've just realised that we also need to update data_file_writer.py
, because we record whether or not the motor is moving as a column in the CSV file and it currently does this by checking whether the returned angle is None
. Would you mind fixing this up too?
I've removed that column from the CSV file entirely. I presume that's what we want, since the only way we check for whether the mirror is moving is if it returns |
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.
The stepper motor classes do have an is_moving
property that you can use instead. Unfortunately we do need this column -- sorry I wasn't clear 😞
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.
LGTM! Thanks for fixing up that extra file 😄
Description
This PR enables getting the immediate position of stepper motors while they are moving.
Previously, querying the position during motion would return
None
. Now, for the ST10, an estimated position is returned.I've had a go at making the dummy stepper motor return a position based on its
QTimer
interval and remaining time, but it's not fully complete, so we can either address that separately or I can finish it up here.Fixes #691
Type of change
Key checklist
pre-commit run -a
)pytest
)mkdocs build -s
)pyinstaller
-built executable works (if relevant)Further checks