• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kontron / python-ipmi / 37296559577
94%

Build:
DEFAULT BRANCH: master
Ran 05 Oct 2026 10:26AM UTC
Jobs 1
Files 53
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Oct 2026 10:26AM UTC coverage: 77.26% (+0.01%) from 77.247%
37296559577

push

github

hthiery
sdr: fix conversion of sensor value to raw value

convert_sensor_value_to_raw() did not compute the inverse of the
conversion formula y = (M * x + B * 10^K1) * 10^K2. The offset B was
subtracted after the division by M instead of before:

  raw = value * 10^-K2 / M - B * 10^K1        (wrong)
  raw = (value * 10^-K2 - B * 10^K1) / M      (correct)

This led to wrong raw values for all sensors with B != 0, e.g. for a
3.3V sensor with M=16, B=163, K2=-3 the value 3.843V was converted to
the raw value 77 instead of 230.

Additionally the encoding of 1's and 2's complement values now depends
on the sign of the raw value instead of the sign of the given value,
because with an offset B these can differ. A negative raw value for an
unsigned sensor now raises a ValueError instead of returning a negative
raw value.

The existing tests only used B=0 where both formulas give the same
result. Add tests with an offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

3 of 3 new or added lines in 1 file covered. (100.0%)

5769 of 7467 relevant lines covered (77.26%)

4.64 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run- - 37296559577.1 05 Oct 2026 10:26AM UTC 53
77.26
GitHub Action Run
Source Files on build 37296559577
  • Tree
  • List 53
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 97c3f9ad on github
  • Prev Build on master (#37296521262)
  • Next Build on master (#37300316354)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc