mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
HyperionUsbAsp supports both ws2801 and ws2812 led strips (#438)
Re-add this option to the schema
This commit is contained in:
parent
1bff517adf
commit
93d520706e
@ -390,6 +390,7 @@
|
||||
"edt_dev_spec_gpioBcm_title" : "GPIO Pin",
|
||||
"edt_dev_spec_ledIndex_title" : "LED index",
|
||||
"edt_dev_spec_colorComponent_title" : "Farbkomponente",
|
||||
"edt_dev_spec_ledType_title" : "LED typ",
|
||||
"edt_conf_general_enable_title" : "Aktiviert",
|
||||
"edt_conf_general_enable_expl" : "Wenn aktiviert, ist die Komponente aktiv.",
|
||||
"edt_conf_general_priority_title" : "Priorität",
|
||||
|
@ -372,6 +372,7 @@
|
||||
"edt_dev_spec_transistionTime_title" : "Transistion time",
|
||||
"edt_dev_spec_switchOffOnBlack_title" : "Switch off on black",
|
||||
"edt_dev_spec_brightnessFactor_title" : "Brightness factor",
|
||||
"edt_dev_spec_ledType_title" : "LED Type",
|
||||
"edt_dev_spec_uid_title" : "UID",
|
||||
"edt_dev_spec_intervall_title" : "Intervall",
|
||||
"edt_dev_spec_latchtime_title" : "Latch time",
|
||||
|
@ -347,6 +347,7 @@
|
||||
"edt_dev_spec_gpioBcm_title": "Pin GPIO",
|
||||
"edt_dev_spec_ledIndex_title": "Índice LED",
|
||||
"edt_dev_spec_colorComponent_title": "Componente de color",
|
||||
"edt_dev_spec_ledType_title": "Tipo de LED",
|
||||
"edt_conf_general_enable_title": "Activar",
|
||||
"edt_conf_general_enable_expl": "Si está marcada, el componente está habilitado",
|
||||
"edt_conf_general_priority_title": "Canal prioritario",
|
||||
@ -714,4 +715,4 @@
|
||||
"wiz_hue_ident": "Identificar",
|
||||
"edt_eff_repeatcount_title": "Repetir cuenta",
|
||||
"edt_eff_maintain_end_color_title": "Mantener color de fin"
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user