Added Ws2812b specific device

Former-commit-id: 675c8f578de42d12e25162065c0d0381ad0e08f6
This commit is contained in:
T. van der Zwan
2013-12-23 21:58:54 +00:00
parent 7f3fbae314
commit 01b5dcdd5c
8 changed files with 475 additions and 128 deletions

View File

@@ -9,6 +9,7 @@
#include "LedDeviceTest.h"
#include "LedDeviceWs2801.h"
#include "LedDeviceWs2811.h"
#include "LedDeviceWs2812b.h"
#include "LedDeviceAdalight.h"
#include "LedDevicePaintpack.h"
#include "LedDeviceLightpack.h"
@@ -32,6 +33,13 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
device = deviceWs2801;
}
else if (type == "ws2812b")
{
LedDeviceWs2812b * deviceWs2812b = new LedDeviceWs2812b();
deviceWs2812b->open();
device = deviceWs2812b;
}
// else if (type == "ws2811")
// {
// const std::string output = deviceConfig["output"].asString();