Bug 1236 - dtm0660: Incorrect Amp measurements (exponent applied twice)
Summary: dtm0660: Incorrect Amp measurements (exponent applied twice)
Status: RESOLVED FIXED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-18 13:02 CEST by Adrian Stratulat
Modified: 2018-06-18 15:41 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Stratulat 2018-06-18 13:02:15 CEST
Hello! While using a PeakTech P3415 multimeter (dtm0660 driver) on the Amps scale, I observed a problem with libsigrok: although the multimeter display was showing 0.400 A, on the computer it reported 0 mA.

After some debugging, I saw that it was getting the data ok, parsing "0.400" as having an exponent of -3, and applied the exponent once again after checking the SI prefix (no prefix -> exponent left on -3 -> another conversion).

This transformed the value from 400mA to 400uA, which then was rounded to zero.

I've attempted a fix here [1], but it will need review.
I've only tested it on my setup, but I see that multiple multimeter models rely on that driver.

Best regards,
Adrian

[1] https://gitlab.com/adrian.stratulat/libsigrok/commit/a5c96923b130b19f7b9fe1426dfc41a77cef9fa5
Comment 1 Uwe Hermann 2018-06-18 15:41:45 CEST
Fixed in b8fcae5a128e2ca3143e05a799f80852ebd911b7, thanks a lot!