added README-md
This commit is contained in:
parent
7164d0b58c
commit
bf3a199aee
7
ws2812fx/README.md
Normal file
7
ws2812fx/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# WS2812FX
|
||||
|
||||
Plug-In for the WS2812FX project, a WS2812 effect library for Arduino and ESP8266.
|
||||
Flash your microcontroller with the provided "serial_control" example. Connect the microcontroller
|
||||
over USB to the nymea device.
|
||||
|
||||
See also: https://github.com/kitesurfer1404/WS2812FX
|
||||
@ -46,14 +46,6 @@ DevicePluginWs2812fx ::DevicePluginWs2812fx ()
|
||||
|
||||
Device::DeviceSetupStatus DevicePluginWs2812fx::setupDevice(Device *device)
|
||||
{
|
||||
if(!m_reconnectTimer) {
|
||||
m_reconnectTimer = new QTimer(this);
|
||||
m_reconnectTimer->setSingleShot(true);
|
||||
m_reconnectTimer->setInterval(5000);
|
||||
|
||||
connect(m_reconnectTimer, &QTimer::timeout, this, &DevicePluginWs2812fx::onReconnectTimer);
|
||||
}
|
||||
|
||||
if (device->deviceClassId() == ws2812fxDeviceClassId) {
|
||||
QString interface = device->paramValue(ws2812fxDeviceSerialPortParamTypeId).toString();
|
||||
|
||||
@ -82,6 +74,14 @@ Device::DeviceSetupStatus DevicePluginWs2812fx::setupDevice(Device *device)
|
||||
device->setStateValue(ws2812fxConnectedStateTypeId, true);
|
||||
m_usedInterfaces.append(interface);
|
||||
m_serialPorts.insert(device, serialPort);
|
||||
|
||||
if(!m_reconnectTimer) {
|
||||
m_reconnectTimer = new QTimer(this);
|
||||
m_reconnectTimer->setSingleShot(true);
|
||||
m_reconnectTimer->setInterval(5000);
|
||||
|
||||
connect(m_reconnectTimer, &QTimer::timeout, this, &DevicePluginWs2812fx::onReconnectTimer);
|
||||
}
|
||||
} else {
|
||||
return Device::DeviceSetupStatusFailure;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user