Skip to content

Add singleton protection #147

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nralbers
Copy link

@nralbers nralbers commented Mar 18, 2025

to prevent read issues with multiple instantiations.
This does not prevent the same issue from arising if multiple processes are using the same library, but it will allow the sensor readings to be read correctly and not return 0 when multiple instances of the SenseHat object are created within the same python process.

To test the difference, the test class will fail on the base code but will run sucessfully on this modified code

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.

1 participant