Added first implementation of WS2811

Former-commit-id: e4fbe7a7f33c28e1f430b5159e6a5cf8c4fc4f9a
This commit is contained in:
T. van der Zwan
2013-12-10 18:59:49 +00:00
parent f65f546c61
commit 2b4adce2d4
4 changed files with 139 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
#include "device/LedDeviceSedu.h"
#include "device/LedDeviceTest.h"
#include "device/LedDeviceWs2801.h"
#include "device/LedDeviceWs2811.h"
#include "device/LedDeviceAdalight.h"
#include "device/LedDeviceLightpack.h"
#include "device/LedDeviceMultiLightpack.h"
@@ -46,6 +47,16 @@ LedDevice* Hyperion::createDevice(const Json::Value& deviceConfig)
device = deviceWs2801;
}
else if (type == "ws2811")
{
const std::string output = deviceConfig["output"].asString();
const bool rate = deviceConfig["fast"].asBool();
LedDeviceWs2811 * deviceWs2811 = new LedDeviceWs2811(output, rate);
deviceWs2811->open();
device = deviceWs2811;
}
else if (type == "lpd6803" || type == "ldp6803")
{
const std::string output = deviceConfig["output"].asString();