Add support for CW2015 LiPo battery fuel gauge#9564
Merged
jp-bennett merged 4 commits intodevelopfrom Feb 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial firmware support for the CW2015 LiPo fuel gauge (voltage + SOC) and updates power-sensor initialization/detection to accommodate it.
Changes:
- Add CW2015 battery gauge initialization and reading logic (gated by
HAS_CW2015). - Refactor/rename the MAX17048 “lipo” init path (
lipoInit()→max17048Init()), and updatePower::setup()ordering. - Update I2C scanning to differentiate devices sharing address
0x62(SCD4X vs CW2015) and add CW2015 to the scanned device enum.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/power.h |
Updates Power init method declarations to include cw2015Init() and max17048Init(). |
src/Power.cpp |
Implements CW2015 battery reader/init and renames MAX17048 battery-level wrapper/init. |
src/configuration.h |
Adds CW2015_ADDR (currently same as SCD4X_ADDR). |
src/detect/ScanI2C.h |
Adds CW2015 to the ScanI2C::DeviceType enum. |
src/detect/ScanI2CTwoWire.cpp |
Modifies detection at 0x62 to distinguish CW2015 vs SCD4X. |
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 i2c chip returns the measured battery voltage and estimate percent charged. Gated behind HAS_CW2015 for now.