Fix getPaletteCount bug

+ correct version to 0.14.0-b1.17
This commit is contained in:
Ewoud
2023-02-04 12:41:13 +01:00
parent e1f14628b0
commit becf87ea0b
5 changed files with 7 additions and 7 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "wled", "name": "wled",
"version": "0.14.0-b7.17", "version": "0.14.0-b1.17",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "wled", "name": "wled",
"version": "0.14.0-b7.17", "version": "0.14.0-b1.17",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"clean-css": "^4.2.3", "clean-css": "^4.2.3",

View File

@@ -1,6 +1,6 @@
{ {
"name": "wled", "name": "wled",
"version": "0.14.0-b7.17", "version": "0.14.0-b1.17",
"description": "Tools for WLED project", "description": "Tools for WLED project",
"main": "tools/cdata.js", "main": "tools/cdata.js",
"directories": { "directories": {

View File

@@ -189,7 +189,7 @@ void sendImprovInfoResponse() {
out[11] = 4; //Firmware len ("WLED") out[11] = 4; //Firmware len ("WLED")
out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D'; out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D';
uint8_t lengthSum = 17; uint8_t lengthSum = 17;
uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b7.17/%i"),VERSION); uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b1.17/%i"),VERSION);
out[16] = vlen; lengthSum += vlen; out[16] = vlen; lengthSum += vlen;
uint8_t hlen = 7; uint8_t hlen = 7;
#ifdef ESP8266 #ifdef ESP8266

View File

@@ -959,7 +959,7 @@ void setPaletteColors(JsonArray json, byte* tcp)
void serializePalettes(JsonObject root, AsyncWebServerRequest* request) void serializePalettes(JsonObject root, AsyncWebServerRequest* request)
{ {
byte tcp[72]; byte tcp[strip.getPaletteCount()]; //WLEDMM use real count instead of fixed number 72
#ifdef ESP8266 #ifdef ESP8266
int itemPerPage = 5; int itemPerPage = 5;
#else #else
@@ -1054,7 +1054,7 @@ void serializePalettes(JsonObject root, AsyncWebServerRequest* request)
if (i>=palettesCount) { if (i>=palettesCount) {
setPaletteColors(curPalette, strip.customPalettes[i - palettesCount]); setPaletteColors(curPalette, strip.customPalettes[i - palettesCount]);
} else { } else {
memcpy_P(tcp, (byte*)pgm_read_dword(&(gGradientPalettes[i - 13])), 72); memcpy_P(tcp, (byte*)pgm_read_dword(&(gGradientPalettes[i - 13])), strip.getPaletteCount()); //WLEDMM use real count instead of fixed number 72
setPaletteColors(curPalette, tcp); setPaletteColors(curPalette, tcp);
} }
} }

View File

@@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2302020 #define VERSION 2302040
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG