fix: fix data acquisition from TSL2561 luminosity sensor#2790
Merged
Conversation
Contributor
Reviewer's GuideRefactor the TSL2561 sensor driver to scan multiple I2C addresses, clean up constants, and correct data reads, and update the sensor list UI to use integer addresses and show IDs in hex. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
Build successful. APKs to test: https://github.com/fossasia/pslab-android/actions/runs/16365621966/artifacts/3561661927 |
AsCress
reviewed
Jul 18, 2025
AsCress
left a comment
Contributor
There was a problem hiding this comment.
@marcnause Thank you very much for this !
When the sensor was probed a second time after being active, the expected value was not returned and the app did not recognize the sensor.
AsCress
approved these changes
Jul 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2783
Changes
I think there are still a few things to fix in the screen, but data acquisition works, which was the scope of the issue.
Screenshots / Recordings
Screen_recording_20250717_191534.mp4
Checklist:
strings.xml,dimens.xmlandcolors.xmlwithout hard coding any value.strings.xml,dimens.xmlorcolors.xml.Summary by Sourcery
Add support for detecting TSL2561 sensors at multiple I2C addresses and correct raw luminosity reads, while updating the sensor screen to display addresses in hex
New Features:
Bug Fixes:
Enhancements: