Skip to content

Conversation

@mitra42
Copy link
Contributor

@mitra42 mitra42 commented Oct 27, 2025

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

@mitra42 mitra42 requested a review from P-R-O-C-H-Y as a code owner October 27, 2025 11:13
@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Add BAT_VOLT_PIN for all variants that define a battery voltage pin with any obviously discoverable name.":
    • summary should not end with a period (full stop)
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello mitra42, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 3367ccf

@me-no-dev
Copy link
Member

@P-R-O-C-H-Y one more thing to keep track of

@P-R-O-C-H-Y P-R-O-C-H-Y added Type: 3rd party Boards Related to third-party/non-Espressif hardware boards. Status: Pending Merge Pull Request is ready to be merged labels Oct 27, 2025
@me-no-dev me-no-dev merged commit 01f0743 into espressif:master Oct 27, 2025
11 checks passed
@mitra42
Copy link
Contributor Author

mitra42 commented Oct 27, 2025

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Pending Merge Pull Request is ready to be merged Type: 3rd party Boards Related to third-party/non-Espressif hardware boards.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Battery pin definition non standard and untestable

4 participants