Open
Conversation
ducky64
requested changes
Mar 19, 2026
Collaborator
ducky64
left a comment
There was a problem hiding this comment.
Thanks, should be a useful part to have in the library.
I've reviewed it against the datasheet and suggested corrections. Also some stylistic suggestions for library consistency. But should be good after corrections.
edg/parts/FuelGauge_Max17048.py
Outdated
|
|
||
|
|
||
| class Max17048(DefaultExportBlock): | ||
| """MAX17048 fuel gauge with decoupling and internal ties""" |
Collaborator
There was a problem hiding this comment.
Style-wise, I have the whole device description here. I also don't duplicate the part number on the docstring - it would be assumed from the class name.
Collaborator
Author
There was a problem hiding this comment.
how about
"""1-Cell Li-Ion voltage based fuel gauge. Senses its pwr as the battery voltage."""
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.
The parts were tested on the ballu Gen2.1 for SoC estimation along with INA219. MAX estimates SoC based on voltage.
Alrt pin hasn't been used yet tho.
This pull request introduces a new part definition for the MAX17048 1-cell Li-Ion fuel gauge, along with its integration into the package exports. The main changes are the addition of a new device class with proper electrical modeling, footprint assignment, and typical usage block, as well as updating the package's
__init__.pyto make the part available for import.New part implementation:
Max17048_Deviceclass inFuelGauge_Max17048.py, modeling the MAX17048 fuel gauge with ports for power, ground, I2C, alert, and QSTRT, including electrical characteristics and footprint assignment.Max17048block inFuelGauge_Max17048.py, which wraps the device with a decoupling capacitor, QSTRT grounding, alert pull-up resistor, and default I2C address assignment for typical usage.Package integration:
__init__.pyto export the newMax17048part, making it available for use elsewhere in the codebase.