-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
driver/sigrok: Add sigrok driver for DMMs #1141
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1141 +/- ##
========================================
- Coverage 63.0% 62.8% -0.3%
========================================
Files 159 159
Lines 11668 11795 +127
========================================
+ Hits 7362 7410 +48
- Misses 4306 4385 +79
☔ View full report in Codecov by Sentry. |
@Bastian-Krause: I've updated my PR, please have another look. (Also fixed some typos here and there while I was on it...) |
time.sleep(0.1) | ||
else: | ||
# process did not finish in time | ||
self.log.info("sigrok-cli did not finish in time, increase timeout?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh, SigrokCommon logs everything as SigrokDriver
. That's confusing. We should fix that, not necessarily in this PR, though..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the best way would be to have a __attrs_post_init__()
in each driver that sets up logging with the correct name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1293.
@Bastian-Krause: I've updated my PR, please have another look. |
The SigrokDmmDriver wraps around a single channel DMM controlled by sigrok. It has been tested with Unit-T UT61C and UT61B devices but probably also works with other single chnnel DMMs. This driver binds to a SigrokUsbDevice. Make sure to select the correct driver for your DMM there. Example usage: > resources: > - SigrokUSBDevice: > driver: uni-t-ut61c > match: > 'ID_PATH': pci-0000:07:00.4-usb-0:2:1.0 > drivers: > - SigrokDmmDriver: {} Args: bindings (dict): driver to use with sigrok Signed-off-by: Chris Fiege <[email protected]> Co-authored-by: Bastian Krause <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
The
SigrokDmmDriver
wraps around a single channel DMM controlled by sigrok. It has been tested with Unit-T UT61C and UT61B devices but probably also works with other single chnnel DMMs.This driver binds to a SigrokUsbDevice.
Make sure to select the correct driver for your DMM there.
Example usage:
Args:
bindings (dict): driver to use with sigrok
I'm already using this driver to read values from two DMMs in parallel during hardware testing:
Where the helper
dmm_*_measure()
makes sure the correct physical unit has been returned by the DMM, does averaging, etc.Checklist