Skip to content

Add support for CW2015 LiPo battery fuel gauge#9564

Merged
jp-bennett merged 4 commits intodevelopfrom
cw2015
Feb 8, 2026
Merged

Add support for CW2015 LiPo battery fuel gauge#9564
jp-bennett merged 4 commits intodevelopfrom
cw2015

Conversation

@jp-bennett
Copy link
Collaborator

This i2c chip returns the measured battery voltage and estimate percent charged. Gated behind HAS_CW2015 for now.

@github-actions github-actions bot added the hardware-support Hardware related: new devices or modules, problems specific to hardware label Feb 7, 2026
@jp-bennett jp-bennett added the enhancement New feature or request label Feb 7, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 update Power::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.

@jp-bennett jp-bennett merged commit eb145f8 into develop Feb 8, 2026
77 checks passed
@jp-bennett jp-bennett deleted the cw2015 branch February 8, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hardware-support Hardware related: new devices or modules, problems specific to hardware

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant