From 6e187dd5aa9fdf4891098c09cf23bcdf2b194612 Mon Sep 17 00:00:00 2001 From: Ewoud Date: Wed, 15 Feb 2023 12:41:15 +0100 Subject: [PATCH] Peek in segment tab Move peek 2D functionality to peek.js FX_fcn.cpp: always erase customMappingTable if non existent ledmap wled_server.cpp: add peek.js index.js: - add canvasPeek - change resize of canvas --- tools/cdata.js | 7 + wled00/FX_fcn.cpp | 4 +- wled00/data/index.htm | 5 +- wled00/data/index.js | 38 +- wled00/data/liveviewws2D.htm | 56 +- wled00/data/peek.js | 51 + wled00/data/settings_2D.htm | 4 +- wled00/html_other.h | 130 +- wled00/html_settings.h | 172 +- wled00/html_ui.h | 4347 +++++++++++++++++----------------- wled00/wled.h | 2 +- wled00/wled_server.cpp | 8 + 12 files changed, 2447 insertions(+), 2377 deletions(-) create mode 100644 wled00/data/peek.js diff --git a/tools/cdata.js b/tools/cdata.js index 30f15621..55b04e13 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -400,6 +400,13 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()====="; method: "gzip", filter: "html-minify", }, + //WLEDMM + { + file: "peek.js", + name: "PAGE_peekJs", + method: "gzip", + filter: "js-minify", + }, { file: "404.htm", name: "PAGE_404", diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 3c771df3..0455bc03 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1973,8 +1973,8 @@ void WS2812FX::deserializeMap(uint8_t n) { } if (!isFile) { - // erase custom mapping if selecting nonexistent ledmap.json (n==0) - if (!n && customMappingTable != nullptr) { + // erase custom mapping if selecting nonexistent ledmap.json (n==0) //WLEDM always erase if nonexistant + if (customMappingTable != nullptr) { //WLEDMM: if isMatrix then not erase but back to matrix default if (isMatrix) setUpMatrix(true); diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 2f732c54..c975522d 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -6,6 +6,7 @@ + WLED - +