added README-md

pull/114/head
nymea 2019-07-26 17:03:06 +02:00
parent 7164d0b58c
commit bf3a199aee
2 changed files with 15 additions and 8 deletions

7
ws2812fx/README.md Normal file
View 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

View File

@ -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;
}