From 080059cbf594d557d375135c9efc7c7779881cd7 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Thu, 1 Dec 2016 20:00:52 +1100 Subject: [PATCH] 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" --- libsrc/leddevice/LedDeviceWs2801.cpp | 1 + libsrc/leddevice/schemas/schema-ws2801.json | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libsrc/leddevice/LedDeviceWs2801.cpp b/libsrc/leddevice/LedDeviceWs2801.cpp index b52cfc02..6f256b26 100644 --- a/libsrc/leddevice/LedDeviceWs2801.cpp +++ b/libsrc/leddevice/LedDeviceWs2801.cpp @@ -3,6 +3,7 @@ LedDeviceWs2801::LedDeviceWs2801(const QJsonObject &deviceConfig) : ProviderSpi() { + _latchTime_ns = 500000; _deviceReady = ProviderSpi::init(deviceConfig); } diff --git a/libsrc/leddevice/schemas/schema-ws2801.json b/libsrc/leddevice/schemas/schema-ws2801.json index 4f36c9a0..3ba66ef1 100644 --- a/libsrc/leddevice/schemas/schema-ws2801.json +++ b/libsrc/leddevice/schemas/schema-ws2801.json @@ -14,12 +14,19 @@ "default": 1000000, "propertyOrder" : 2 }, + "latchtime": { + "type": "integer", + "title":"Latchtime", + "default": 500000, + "append" : "ns", + "propertyOrder" : 3 + }, "invert": { "type": "boolean", "format": "checkbox", "title":"Invert signal", "default": false, - "propertyOrder" : 3 + "propertyOrder" : 4 } }, "additionalProperties": true