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: initialize hardware during reconfigure, move out of get_readings #10

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

HipsterBrown
Copy link
Collaborator

This PR provides some quality-of-life refactoring of the module by only initializing the SPI bus and GPIO pin once during reconfigure, rather than every time get_readings is called. This ensures the hardware is properly released when the module is closed and reconfigured.

@HipsterBrown HipsterBrown merged commit 68e406e into main Dec 31, 2024
1 check passed
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