From 5521205b873992a90578af9885df801c8dc83b9b Mon Sep 17 00:00:00 2001 From: Awawa Date: Mon, 12 Sep 2022 20:53:04 +0200 Subject: [PATCH 01/10] SPI devices discovery --- assets/webconfig/js/light_source.js | 33 +++++++++++++++++++ sources/leddevice/dev_spi/ProviderSpi.cpp | 31 +++++++++++++++++ sources/leddevice/dev_spi/ProviderSpi.h | 2 ++ sources/leddevice/schemas/schema-apa102.json | 4 --- sources/leddevice/schemas/schema-apa104.json | 4 --- sources/leddevice/schemas/schema-awa_spi.json | 4 --- sources/leddevice/schemas/schema-lpd6803.json | 4 --- sources/leddevice/schemas/schema-lpd8806.json | 4 --- sources/leddevice/schemas/schema-p9813.json | 4 --- .../leddevice/schemas/schema-sk6812spi.json | 4 --- .../leddevice/schemas/schema-sk6822spi.json | 4 --- sources/leddevice/schemas/schema-sk9822.json | 4 --- sources/leddevice/schemas/schema-ws2801.json | 4 --- .../leddevice/schemas/schema-ws2812spi.json | 4 --- 14 files changed, 66 insertions(+), 44 deletions(-) diff --git a/assets/webconfig/js/light_source.js b/assets/webconfig/js/light_source.js index ba591ca49..236aaf40a 100644 --- a/assets/webconfig/js/light_source.js +++ b/assets/webconfig/js/light_source.js @@ -894,6 +894,39 @@ $(document).ready(function() $("input[name='root[specificOptions][host]']")[0].style.width = String(58) + "%"; $("input[name='root[specificOptions][host]']")[0].parentElement.appendChild(sPort[0]); } + else if (["apa102", "apa104", "awa_spi", "lpd6803", "lpd8806", "p9813", "sk6812spi", "sk6822spi", "sk9822", "ws2801", "ws2812spi"].includes(ledType)) + { + async function spiDevRefresh(result) + { + let receiver = $("#selectSpiOutput"); + receiver.off(); + receiver.empty(); + + $("