mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Sk6812rgbwfix (#95)
* sk6812rgbw bug fix and rename device to sk6812rgbw-spi * Added white_algorithm support to sk6812rgbw-spi device type
This commit is contained in:
@@ -147,12 +147,13 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceWs2812SPI;
|
||||
}
|
||||
else if (type == "sk6812spi")
|
||||
else if (type == "sk6812rgbw-spi")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig.get("rate",2857143).asInt();
|
||||
const std::string& whiteAlgorithm = deviceConfig.get("white_algorithm","").asString();
|
||||
|
||||
LedDeviceSk6812SPI* deviceSk6812SPI = new LedDeviceSk6812SPI(output, rate);
|
||||
LedDeviceSk6812SPI* deviceSk6812SPI = new LedDeviceSk6812SPI(output, rate, whiteAlgorithm);
|
||||
deviceSk6812SPI->open();
|
||||
|
||||
device = deviceSk6812SPI;
|
||||
|
Reference in New Issue
Block a user