mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
APA102 device for use with Adalight (nominaly for ws2801)
Former-commit-id: 7fb9e8e84518be9387ea9feca11e93a8a5389e4f
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "LedDevicePhilipsHue.h"
|
||||
#include "LedDeviceTpm2.h"
|
||||
#include "LedDeviceAtmo.h"
|
||||
#include "LedDeviceAdalightApa102.h"
|
||||
|
||||
#ifdef ENABLE_WS2812BPWM
|
||||
#include "LedDeviceWS2812b.h"
|
||||
@@ -58,6 +59,17 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceAdalight;
|
||||
}
|
||||
else if (type == "adalightapa102")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
const int delay_ms = deviceConfig["delayAfterConnect"].asInt();
|
||||
|
||||
LedDeviceAdalightApa102* deviceAdalightApa102 = new LedDeviceAdalightApa102(output, rate, delay_ms);
|
||||
deviceAdalightApa102->open();
|
||||
|
||||
device = deviceAdalightApa102;
|
||||
}
|
||||
else if (type == "ambiled")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
|
Reference in New Issue
Block a user