mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added first implementation of WS2811
Former-commit-id: e4fbe7a7f33c28e1f430b5159e6a5cf8c4fc4f9a
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user