fix(rak12035): add missing returns, remove unused locals, and cleanup#2649
Open
LeoCatsune wants to merge 1 commit into
Open
fix(rak12035): add missing returns, remove unused locals, and cleanup#2649LeoCatsune wants to merge 1 commit into
LeoCatsune wants to merge 1 commit into
Conversation
Removed unused/shadowing locals, eliminated redundant version reads, fixed missing `sensor_on()` return path, aligned timeout behavior with comments, and clean up debug-only code and formatting. Address handling behavior is unchanged; `begin(addr)` was already ignoring the passed address and now relies on constructor-initialised `_addr`.
Author
|
Just double-checked, wio build fails on |
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.
This commit seeks to address a number of issues in
src/helpers/sensors/RAK12035_SoilMoisture.cpp, namely:RAK12035_SoilMoisture::sensor_on()(return typebool)The missing return caused downstream projects depending on MeshCore to fail compilation under
-Werror=return-type, which subsequently led to discovery of the other issues addressed here.One notable change affects initialisation in
EnvironmentSensorManager.cpp.RAK12035_SoilMoisture::begin()was observed to ignore itsaddrparameter and instead rely on the address supplied via the constructor. To make this behaviour explicit and consistent with existing patterns, the initialisation flow was updated to match howINA226is handled in the same file. No change in effective addressing behaviour is intended.Please note that I do not have access to the relevant hardware and therefore am unable to fully validate runtime behaviour. I would appreciate any input from those who depend on this module.
CC: @KPrivitt