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

BF APT Thorlabs home_parameters #338

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

trappitsch
Copy link
Contributor

@trappitsch trappitsch commented Mar 25, 2022

Small bug that I didn't think of: If the user tried to set the home offset value to zero since PR #337, the existing offset was used and not the zero. Will point it out in code. This is now fixed. And tested for!

@@ -1407,7 +1407,7 @@ def home_parameters(self, values):
# replace values that are `None`
if None in values:
set_params = self.home_parameters
values = [x if x else y for x, y in zip(values, set_params)]
values = [x if x is not None else y for x, y in zip(values, set_params)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here we need to check in fact if x is not None and not just if x, otherwise an offset of zero cannot be set...

Copy link
Contributor

Choose a reason for hiding this comment

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

good point 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:) thanks!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0002%) to 99.486% when pulling b05b6c9 on trappitsch:bf_thorlabs_apt into bd4fc9f on Galvant:main.

@scasagrande scasagrande merged commit 6b5dc23 into instrumentkit:main Mar 25, 2022
@trappitsch trappitsch deleted the bf_thorlabs_apt branch March 29, 2022 10:26
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.

3 participants