-
Notifications
You must be signed in to change notification settings - Fork 320
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 / RUDAT 13G 90 #1073
driver / RUDAT 13G 90 #1073
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1073 +/- ##
=======================================
Coverage 78.66% 78.66%
=======================================
Files 46 46
Lines 6478 6478
=======================================
Hits 5096 5096
Misses 1382 1382 |
…ts: Thanks Dominik!
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.
Great that you could implement the pywinusb library, like in PR #813. Yes, you are right, this version here is more condensed. The reason the original version in #813 is less condensed is, that it is more general in the sense that it provides a usb mixin class that should in principle be possible to use in all similar devices.
Your reimplementation also will run into problems once you have multiple devices of the same type.
I also noted that the IDN format is not conforming with the other devices.
Looking at it again I think you should build on the old PR. You can simply push to that branch. |
Actually, @Dominik-Vogel , I think I should keep the new PR. Your PR (#813) adds a driver for the rcdat_6000_60, which I do not have. I would either have to remove your driver or I'd have to push untested code, neither of which is desirable. I think we should merge this PR (once it is approved) and then in your branch you can use my mixin class. |
2) Test that we are under windows when loading this driver. 3) If the pywinusb module is not found, then prompt the user to install this.
…hile CI should pass.
…hile CI should pass.
Using a Mixin class did not work well with mypy. A similar situation is described here: I think the only solution is to make a subclass USBHIDInstrument and inherit from that. |
Dear @sohailc, I would prefer making a mixin and make an exception for mypy until the issue gets resolved. The reason for this is, that mypy is checking, a commodity feature, and the mixin is required to not repeat the same code: For minicircuits there exist quite a few devices that are ethernet and usb connectable. If you want to make a consistent driver you can implement all the same commands and then only add a mixin for the usb case. |
Ok, I am using a Mixin, have another look, @Dominik-Vogel |
…the MiniCircuitsHIDMixin
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.
I would suggest one last change:
the vendor_id and product_id should be set to some invalid value in the mixin and then get their current values in the RUDAT_13G_90_USB
Added a driver for the microcircuits RUDAT 13G 90 attenutator