Skip to content
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

Always notify motor move end #716

Merged
merged 6 commits into from
Nov 21, 2024
Merged

Always notify motor move end #716

merged 6 commits into from
Nov 21, 2024

Conversation

dc2917
Copy link
Contributor

@dc2917 dc2917 commented Nov 20, 2024

Description

This PR removes the notify_on_stopped method from stepper_motor devices, on the basis that we will always send the "move.end" message once the mirror has stopped moving.

Fixes #704

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation (non-breaking change that adds or improves the documentation)
  • Optimisation (non-breaking, back-end change that speeds up the code)

Key checklist

  • Pre-commit hooks run successfully (pre-commit run -a)
  • All tests pass (pytest)
  • The documentation builds without warnings (mkdocs build -s)
  • Check the GUI still works (if relevant)
  • Check the code works with actual hardware (if relevant)
  • Check the pyinstaller-built executable works (if relevant)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests have been added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@dc2917 dc2917 requested a review from alexdewar November 20, 2024 10:15
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.87%. Comparing base (c49eede) to head (7192224).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #716      +/-   ##
==========================================
- Coverage   86.97%   86.87%   -0.11%     
==========================================
  Files          69       69              
  Lines        3570     3558      -12     
==========================================
- Hits         3105     3091      -14     
- Misses        465      467       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Collaborator

@alexdewar alexdewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I've tested and it seems to work great. Always nice to remove code.

@dc2917
Copy link
Contributor Author

dc2917 commented Nov 21, 2024

LGTM! I've tested and it seems to work great. Always nice to remove code.

Indeed! Reminded me of the blog post you shared about writing code that's easy to delete 🙌

@dc2917 dc2917 merged commit 05c0351 into main Nov 21, 2024
7 checks passed
@dc2917 dc2917 deleted the always_notify_motor_move_end branch November 21, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Always notify on motor move end
2 participants