Adds support for AVLdiy.cn D512 usb dmx device, closes #1073 - #1134
Conversation
peternewman
left a comment
There was a problem hiding this comment.
Some lint issues for starters.
I'm wondering if you can sensibly subclass some of the Anyma uDMX classes, or if it's worth it.
| * @param serial the serial number of the widget. | ||
| */ | ||
| AVLdiyD512(ola::usb::LibUsbAdaptor *adaptor, | ||
| libusb_device *usb_device, |
There was a problem hiding this comment.
Indent by one to match the (
| */ | ||
| AVLdiyD512(ola::usb::LibUsbAdaptor *adaptor, | ||
| libusb_device *usb_device, | ||
| const std::string &serial) |
There was a problem hiding this comment.
Indent by one to match the (
| * @param serial the serial number of the widget. | ||
| */ | ||
| SynchronousAVLdiyD512(ola::usb::LibUsbAdaptor *adaptor, | ||
| libusb_device *usb_device, |
There was a problem hiding this comment.
Indent by one to match the (
| */ | ||
| SynchronousAVLdiyD512(ola::usb::LibUsbAdaptor *adaptor, | ||
| libusb_device *usb_device, | ||
| const std::string &serial); |
There was a problem hiding this comment.
Indent by one to match the (
| * @param serial the serial number of the widget. | ||
| */ | ||
| AsynchronousAVLdiyD512(ola::usb::LibUsbAdaptor *adaptor, | ||
| libusb_device *usb_device, |
There was a problem hiding this comment.
Indent by one to match the (
| */ | ||
| AsynchronousAVLdiyD512(ola::usb::LibUsbAdaptor *adaptor, | ||
| libusb_device *usb_device, | ||
| const std::string &serial); |
There was a problem hiding this comment.
Indent by one to match the (
| # udev rules for the anyma dmx device | ||
| SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="plugdev" | ||
|
|
||
| # udev rules for the avldiy dmx device |
There was a problem hiding this comment.
Can you also open a PR here to patch the pi file: https://github.com/OpenLightingProject/raspberrypi/blob/master/etc/udev/rules.d/10-local.rules
There was a problem hiding this comment.
| * | ||
| * AVLdiyD512.cpp | ||
| * The synchronous and asynchronous AVLdiy D512 widgets. | ||
| * Copyright (C) 2014 Simon Newton |
There was a problem hiding this comment.
Correct this to your name and 2016.
| * | ||
| * AVLdiyD512.h | ||
| * The synchronous and asynchronous AVLdiy D512 widgets. | ||
| * Copyright (C) 2014 Simon Newton |
There was a problem hiding this comment.
Correct this to your name and 2016.
| * | ||
| * AVLdiyD512Factory.cpp | ||
| * The factory for AVLdiy D512 widgets. | ||
| * Copyright (C) 2014 Simon Newton |
There was a problem hiding this comment.
Correct this to your name and 2016.
| * | ||
| * AVLdiyD512Factory.h | ||
| * The factory for AVLdiy D512 widgets. | ||
| * Copyright (C) 2014 Simon Newton |
There was a problem hiding this comment.
Correct this to your name and 2016.
|
If you resync @thgjerde the Mac tests should now pass. |
|
This will close #1073 . |
The AVLdiy.cn D512 uses the same protocol as the Anyma uDMX device.
|
I don't see an easy way to inherit from the AnymauDMX classes without refactoring all of the SimpleWidget inheritance tree. |
|
Okay, I'd not really looked, just throwing it out there. Can you avoid squashing in future please, as it makes my job harder to see if you've fixed the comments. |
|
Can you also add a mention of your interface to: https://github.com/OpenLightingProject/ola/blob/master/plugins/usbdmx/UsbDmxPlugin.cpp#L95 You may also want to add yourself here: |
peternewman
left a comment
There was a problem hiding this comment.
Just a few final bits from me.
| }; | ||
|
|
||
| bool AVLdiyThreadedSender::TransmitBuffer(libusb_device_handle *handle, | ||
| const DmxBuffer &buffer) { |
There was a problem hiding this comment.
Indent by one to match the (
| return true; | ||
| } | ||
|
|
||
| bool SyncPluginImpl::NewWidget(AVLdiyD512 *widget) { |
There was a problem hiding this comment.
Can you put this below the AnymauDMX method.
| m_debug_level(debug_level), | ||
| m_preferences(preferences), | ||
| m_context(NULL) { | ||
| m_widget_factories.push_back(new AVLdiyD512Factory(&m_usb_adaptor)); |
There was a problem hiding this comment.
Can you put this below the AnymauDMX method.
|
Aside from my final comments, anything else from yourself @nomis52 ? |
|
I think I have addressed all the requested changes. |
|
Please let me know if there is anything more I should fix. |
|
Thanks @thgjerde , sorry I've been away, I'll take a proper look tonight and should be able to merge them from the looks of things. |
|
LGTM |
The AVLdiy.cn D512 uses the same protocol as the Anyma uDMX device.