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

Fix: DummyStepperMotor returns None if moving #750

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

alexdewar
Copy link
Collaborator

Description

As with the ST10Controller before #743, the DummyStepperMotor returns an angle of None if it is in motion. However, this isn't what we want anymore; if you try to record data while using the DummyStepperMotor you now get an error when the code tries to use this None value. Change it to return the old angle instead.

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))

As with the `ST10Controller` before #743, the `DummyStepperMotor` returns an angle of `None` if it is in motion. However, this isn't what we want anymore; if you try to record data while using the `DummyStepperMotor` you now get an error when the code tries to use this `None` value.

Instead, return the old (pre-move) angle.
@alexdewar alexdewar requested review from dc2917 and dalonsoa and removed request for dc2917 December 18, 2024 15:56
@alexdewar alexdewar added the bug Something isn't working label Dec 18, 2024
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.93%. Comparing base (6680116) to head (b2589ee).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #750      +/-   ##
==========================================
- Coverage   86.94%   86.93%   -0.01%     
==========================================
  Files          69       69              
  Lines        3561     3560       -1     
==========================================
- Hits         3096     3095       -1     
  Misses        465      465              

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

@alexdewar alexdewar mentioned this pull request Dec 18, 2024
12 tasks
Copy link
Contributor

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexdewar alexdewar merged commit 15cac7d into main Dec 19, 2024
7 checks passed
@alexdewar alexdewar deleted the fix-dummy-stepper-motor branch December 19, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants