periph / devices

Go·Hardware·Lean - Device drivers
https://periph.io
Apache License 2.0
83 stars 37 forks source link

ina219: Interpret signed output register values #54

Closed eldondevat closed 1 year ago

eldondevat commented 1 year ago

The current and shunt voltage register values are signed, twos complement format. In my tests interpreting them directly in the way implemented here gave output consistent with other ina219 libraries.

codecov-commenter commented 1 year ago

Codecov Report

Merging #54 (ec1825f) into main (212f060) will increase coverage by 0.1%. The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main     #54     +/-   ##
=======================================
+ Coverage   64.9%   64.9%   +0.1%     
=======================================
  Files         60      60             
  Lines       7066    7066             
=======================================
+ Hits        4583    4589      +6     
+ Misses      2329    2325      -4     
+ Partials     154     152      -2     
Impacted Files Coverage Δ
ina219/ina219.go 100.0% <100.0%> (ø)
ads1x15/ads1x15.go 85.4% <0.0%> (+2.2%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more