Update of all variant files to add BAT_VOLT_PIN for all variants that define a battery voltage pin #11954
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.
Closes #11953
Description of Change
Variant files define the battery voltage pin in at least 15 different ways, this makes it impossible to write library code that works with the battery across multiple boards without a VERY long ifdef which (since existing variant files define
const uint8_t) can only test against board names.Adding this #define allows for board and variant independent battery code for all boards that define a battery pin.
Note - name of pin BAT_VOLT_PIN as suggested by @me-no-dev
Test Scenarios
Please describe on what Hardware and Software combinations you have tested this Pull Request and how.
I have tested on lilygo_t3_s3 using the variant lilygo_t3_s3_sx127x, changing a battery sensor to use this new #define.
Related links
Please provide links to related issue, PRs etc.
Closes #11953