mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
HyperionUsbAsp supports both ws2801 and ws2812 led strips (#438)
Re-add this option to the schema
This commit is contained in:
@@ -41,10 +41,10 @@ bool LedDeviceHyperionUsbasp::init(const QJsonObject &deviceConfig)
|
||||
{
|
||||
LedDevice::init(deviceConfig);
|
||||
|
||||
QString ledType = deviceConfig["output"].toString("ws2801");
|
||||
QString ledType = deviceConfig["ledType"].toString("ws2801");
|
||||
if (ledType != "ws2801" && ledType != "ws2812")
|
||||
{
|
||||
throw std::runtime_error("HyperionUsbasp: invalid output; must be 'ws2801' or 'ws2812'.");
|
||||
throw std::runtime_error("HyperionUsbasp: invalid ledType; must be 'ws2801' or 'ws2812'.");
|
||||
}
|
||||
|
||||
_writeLedsCommand = (ledType == "ws2801") ? CMD_WRITE_WS2801 : CMD_WRITE_WS2812;
|
||||
|
@@ -11,7 +11,14 @@
|
||||
"maximum": 1000,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 1
|
||||
}
|
||||
},
|
||||
"ledType": {
|
||||
"type": "string",
|
||||
"title":"edt_dev_spec_ledType_title",
|
||||
"enum" : ["ws2801","ws2812"],
|
||||
"default": "ws2801",
|
||||
"propertyOrder" : 2
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
|
Reference in New Issue
Block a user