Skip to content

Always handle energy in microwatt-hours#31

Merged
superm1 merged 3 commits intosuperm1:masterfrom
malsyned:issue-29-charge-energy
Mar 16, 2026
Merged

Always handle energy in microwatt-hours#31
superm1 merged 3 commits intosuperm1:masterfrom
malsyned:issue-29-charge-energy

Conversation

@malsyned
Copy link
Contributor

If a battery only provides capacity values in microamp-hours, convert charge to energy by multiplying by the battery's design voltage.

Fixes #29

If a battery only provides capacity values in microamp-hours, convert
charge to energy by multiplying by the battery's design voltage.

Fixes superm1#29
@malsyned malsyned force-pushed the issue-29-charge-energy branch from c2ffbe1 to 04e6ac9 Compare March 16, 2026 02:40
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.91%. Comparing base (4440b17) to head (31a1670).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage   85.72%   85.91%   +0.19%     
==========================================
  Files          34       34              
  Lines        7620     7655      +35     
  Branches      722      723       +1     
==========================================
+ Hits         6532     6577      +45     
+ Misses        871      866       -5     
+ Partials      217      212       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

malsyned and others added 2 commits March 16, 2026 08:54
…tency

I used GREEK SMALL LETTER MU (μ) in the docstring for
_get_design_voltage(), but the rest of the codebase uses MICRO SIGN (µ)
everywhere.
@superm1 superm1 merged commit 3cb14fe into superm1:master Mar 16, 2026
6 checks passed
@malsyned malsyned deleted the issue-29-charge-energy branch March 16, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Battery Ave Rate completely wrong on batteries that expose charge_now instead of energy_now in sysfs

2 participants