diff --git a/tools/cdata.js b/tools/cdata.js index bf5a65e8..97000436 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -221,6 +221,7 @@ function writeChunks(srcDir, specs, resultFile) { writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", 'index'); writeHtmlGzipped("wled00/data/simple.htm", "wled00/html_simple.h", 'simple'); writeHtmlGzipped("wled00/data/pixart/pixart.htm", "wled00/html_pixart.h", 'pixart'); +writeHtmlGzipped("wled00/data/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal'); /* writeChunks( "wled00/data", diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 226f6357..c3873765 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -5522,22 +5522,30 @@ uint16_t mode_2Dtartan(void) { // By: Elliott Kember https://editor.so SEGMENT.fill(BLACK); } - uint8_t hue; + uint8_t hue, bri; + size_t intensity; int offsetX = beatsin16(3, -360, 360); int offsetY = beatsin16(2, -360, 360); + int sharpness = SEGMENT.custom3 / 8; // 0-3 for (int x = 0; x < cols; x++) { for (int y = 0; y < rows; y++) { hue = x * beatsin16(10, 1, 10) + offsetY; - SEGMENT.setPixelColorXY(x, y, ColorFromPalette(SEGPALETTE, hue, sin8(x * SEGMENT.speed + offsetX) * sin8(x * SEGMENT.speed + offsetX) / 255, LINEARBLEND)); + intensity = bri = sin8(x * SEGMENT.speed/2 + offsetX); + for (int i=0; i>= 8*sharpness; + SEGMENT.setPixelColorXY(x, y, ColorFromPalette(SEGPALETTE, hue, intensity, LINEARBLEND)); hue = y * 3 + offsetX; - SEGMENT.addPixelColorXY(x, y, ColorFromPalette(SEGPALETTE, hue, sin8(y * SEGMENT.intensity + offsetY) * sin8(y * SEGMENT.intensity + offsetY) / 255, LINEARBLEND)); + intensity = bri = sin8(y * SEGMENT.intensity/2 + offsetY); + for (int i=0; i>= 8*sharpness; + SEGMENT.addPixelColorXY(x, y, ColorFromPalette(SEGPALETTE, hue, intensity, LINEARBLEND)); } } return FRAMETIME; } // mode_2DTartan() -static const char _data_FX_MODE_2DTARTAN[] PROGMEM = "Tartan@X scale,Y scale;;!;2"; +static const char _data_FX_MODE_2DTARTAN[] PROGMEM = "Tartan@X scale,Y scale,,,Sharpness;;!;2"; ///////////////////////// diff --git a/wled00/const.h b/wled00/const.h index 62db8d7d..e9f39af3 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -265,7 +265,7 @@ #define BTN_TYPE_ANALOG_INVERTED 8 //Ethernet board types -#define WLED_NUM_ETH_TYPES 9 +#define WLED_NUM_ETH_TYPES 10 #define WLED_ETH_NONE 0 #define WLED_ETH_WT32_ETH01 1 @@ -274,6 +274,7 @@ #define WLED_ETH_QUINLED 4 #define WLED_ETH_TWILIGHTLORD 5 #define WLED_ETH_ESP32DEUX 6 +#define WLED_ETH_ABCWLEDV43ETH 9 //Hue error codes #define HUE_ERROR_INACTIVE 0 diff --git a/wled00/data/cpal/cpal.htm b/wled00/data/cpal/cpal.htm new file mode 100644 index 00000000..5a8c801e --- /dev/null +++ b/wled00/data/cpal/cpal.htm @@ -0,0 +1,689 @@ + + + + + + + WLED Custom Palette Editor + + + + + +
+
+

+ + + + + + + WLED Custom Palette Editor +

+
+ +
+
+
+
+
+
+ Currently in use custom palettes +
+
+
+ +
+
+ Click on the gradient editor to add new color slider, then the colored box below the slider to change its color. + Click the red box below indicator (and confirm) to delete. + Once finished, click the arrow icon to upload into the desired slot. + To edit existing palette, click the pencil icon. +
+
+
+
+
+ Available static palettes +
+
+
+ + + + + diff --git a/wled00/data/index.css b/wled00/data/index.css index 76dc3881..fb8fad72 100644 --- a/wled00/data/index.css +++ b/wled00/data/index.css @@ -1245,7 +1245,7 @@ TD .checkmark, TD .radiomark { .list { position: relative; transition: background-color 0.5s; - margin: auto auto 20px; + margin: auto auto 10px; line-height: 24px; } diff --git a/wled00/data/index.htm b/wled00/data/index.htm index f2ecd77c..4df0ad8e 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -198,6 +198,10 @@
+
+ + +
diff --git a/wled00/data/index.js b/wled00/data/index.js index 99ed9755..93ad3f13 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -888,8 +888,21 @@ function populatePalettes() `
` ); } - gId('pallist').innerHTML=html; + // append custom palettes (when loading for the 1st time) + if (!isEmpty(lastinfo) && lastinfo.cpalcount) { + for (let j = 0; j` + ); + } + } } function redrawPalPrev() @@ -1588,21 +1601,8 @@ function requestJson(command=null) if (json.success) return; if (json.info) { let i = json.info; - // append custom palettes (when loading for the 1st time) - if (!command && isEmpty(lastinfo) && i.cpalcount) { - for (let j = 0; j` - ); - } - } parseInfo(i); + populatePalettes(i); if (isInfo) populateInfo(i); } var s = json.state ? json.state : json; diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm index 26b7ab89..3c9dcc19 100644 --- a/wled00/data/settings_wifi.htm +++ b/wled00/data/settings_wifi.htm @@ -186,6 +186,7 @@

Ethernet Type