OpenLightingProject / ola

The Open Lighting Architecture - The Travel Adaptor for the Lighting Industry
https://www.openlighting.org/ola/
Other
644 stars 204 forks source link

Fadecandy hot plug doesn't work #564

Closed peternewman closed 9 years ago

peternewman commented 9 years ago

You have to run fcserver to make it start working again.

I suspect this is because we aren't sending a LUT, see #563

peternewman commented 9 years ago

Partially down to the LUT. In sync mode it still doesn't work, at least on the machine I've tested on. It never seems to detect the device has been reconnected.

Works fine in async apart from a brief blackout (not sure if we can reduce/eliminate the blackout somehow), I suspect it occurs when the LUT is made live before a frame has been loaded.

peternewman commented 9 years ago

Specifically in sync mode I get this:

plugins/usbdmx/ScanlimeFadecandy.cpp:238: Data transfer failed with error Error code -1 plugins/usbdmx/ThreadedUsbSender.cpp:77: Send failed, stopping thread...

I must have imagined it @nomis52 , as I can't find it in the code now, I thought you were periodically calling ScanForDevices to do a poor mans hotplug when in sync mode, but if you were, that code seems to have gone away now.

nomis52 commented 9 years ago

In SyncPluginImpl::Start there is a timeout created that calls ReScanForDevices().

The issue is, in sync mode when the thread fails there is no notification back to the plugin object. So the 'stuck' device just hangs around forever. I wouldn't spend too much time on it considering async is the way we're going.

peternewman commented 9 years ago

Correction, that is only for firmware updates. What I remembered is in async here https://github.com/OpenLightingProject/ola/blob/2c91dfc207f9ac4ec5fecaf479342474163f0568/plugins/usbdmx/AsyncPluginImpl.cpp#L128 so we'll call this closed. It works in async mode nicely. Tracking trying to fix/improve the blackout issue is now tracked in #604 .