Added latchtime web configuration for ws2801 device. (#302)

* Added latchtime web configuration for ws2801 device.
Fixed default to be 500000ns

* cleaner code using defaults and added "ns" to web schema

* oops... "ns" not "ms"
This commit is contained in:
penfold42 2016-12-01 20:00:52 +11:00 committed by redPanther
parent 3e5ca4601d
commit 080059cbf5
2 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,7 @@
LedDeviceWs2801::LedDeviceWs2801(const QJsonObject &deviceConfig) LedDeviceWs2801::LedDeviceWs2801(const QJsonObject &deviceConfig)
: ProviderSpi() : ProviderSpi()
{ {
_latchTime_ns = 500000;
_deviceReady = ProviderSpi::init(deviceConfig); _deviceReady = ProviderSpi::init(deviceConfig);
} }

View File

@ -14,12 +14,19 @@
"default": 1000000, "default": 1000000,
"propertyOrder" : 2 "propertyOrder" : 2
}, },
"latchtime": {
"type": "integer",
"title":"Latchtime",
"default": 500000,
"append" : "ns",
"propertyOrder" : 3
},
"invert": { "invert": {
"type": "boolean", "type": "boolean",
"format": "checkbox", "format": "checkbox",
"title":"Invert signal", "title":"Invert signal",
"default": false, "default": false,
"propertyOrder" : 3 "propertyOrder" : 4
} }
}, },
"additionalProperties": true "additionalProperties": true