Skip to content

Commit

Permalink
Merge branch 'Aircoookie:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ccruz09 committed Jan 27, 2024
2 parents c74603b + 2b0fad8 commit bbe1062
Show file tree
Hide file tree
Showing 18 changed files with 4,253 additions and 4,183 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## WLED changelog

#### Build 2401141
- Official release of WLED 0.14.1
- Fix for #3566, #3665, #3672
- Sorting of palettes in custom palette editor (#3674 by @WoodyLetsCode)

#### Build 2401060
- Version bump: 0.14.1-b3
- Global JSON buffer guarding (#3648 by @willmmiles, resolves #3641, #3312, #3367, #3637, #3646, #3447)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.14.1-b3",
"version": "0.14.1",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ starlette==0.23.1
# via platformio
tabulate==0.9.0
# via platformio
urllib3==1.26.15
urllib3==1.26.18
# via requests
uvicorn==0.20.0
# via platformio
Expand Down
2 changes: 1 addition & 1 deletion wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ uint8_t Segment::currentBri(bool useCct) {
uint32_t prog = progress();
if (prog < 0xFFFFU) {
uint32_t curBri = (useCct ? cct : (on ? opacity : 0)) * prog;
curBri += (useCct ? _t->_cctT : (on ? _t->_briT : 0)) * (0xFFFFU - prog);
curBri += (useCct ? _t->_cctT : _t->_briT) * (0xFFFFU - prog);
return curBri / 0xFFFFU;
}
return (useCct ? cct : (on ? opacity : 0));
Expand Down
2 changes: 1 addition & 1 deletion wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ void serializeConfig() {

JsonObject wifi = doc.createNestedObject("wifi");
wifi[F("sleep")] = !noWifiSleep;
wifi[F("phy")] = (int)force802_3g;
wifi[F("phy")] = force802_3g;

#ifdef WLED_USE_ETHERNET
JsonObject ethernet = doc.createNestedObject("eth");
Expand Down
16 changes: 13 additions & 3 deletions wled00/data/cpal/cpal.htm
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ <h1 style="display: flex; align-items: center;">
var gradientLength = rect.width;
var mOffs = Math.round((gradientLength / 256) / 2) - 5;
var paletteArray = []; //Holds the palettes after load.
var paletteName = []; // Holds the names of the palettes after load.
var svgSave = '<svg style="width:25px;height:25px" viewBox="0 0 24 24"><path fill=#fff d="M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M7,12L12,17V14H16V10H12V7L7,12Z"/></svg>'
var svgEdit = '<svg style="width:25px;height:25px" viewBox="0 0 24 24"><path fill=#fff d="M12,2C6.47,2 2,6.47 2,12C2,17.53 6.47,22 12,22C17.53,22 22,17.53 22,12C22,6.47 17.53,2 12,2M15.1,7.07C15.24,7.07 15.38,7.12 15.5,7.23L16.77,8.5C17,8.72 17,9.07 16.77,9.28L15.77,10.28L13.72,8.23L14.72,7.23C14.82,7.12 14.96,7.07 15.1,7.07M13.13,8.81L15.19,10.87L9.13,16.93H7.07V14.87L13.13,8.81Z"/></svg>'

Expand Down Expand Up @@ -520,8 +521,10 @@ <h1 style="display: flex; align-items: center;">
if (hst.length > 0 ) {
try {
var arr = [];
const response = await fetch('http://'+hst+'/json/info');
const json = await response.json();
const responseInfo = await fetch('http://'+hst+'/json/info');
const responsePalettes = await fetch('http://'+hst+'/json/palettes');
const json = await responseInfo.json();
paletteName = await responsePalettes.json();
cpalc = json.cpalcount;
fetchPalettes(cpalc-1);
} catch (error) {
Expand Down Expand Up @@ -560,6 +563,7 @@ <h1 style="display: flex; align-items: center;">
alert("The cache of palettes are missig from your browser. You should probably return to the main page and let it load properly for the palettes cache to regenerate before returning here.","Missing cached palettes!")
} else {
for (const key in wledPalx.p) {
wledPalx.p[key].name = paletteName[key];
if (key > 245) {
delete wledPalx.p[key];
continue;
Expand Down Expand Up @@ -591,8 +595,11 @@ <h1 style="display: flex; align-items: center;">
}

const pArray = Object.entries(wledPalx.p).map(([key, value]) => ({
[key]: value.flat()
[key]: value.flat(),
name: value.name
}));
// Sort pArray by name
pArray.sort((a, b) => a.name.localeCompare(b.name));

paletteArray.push( ...pArray);
}
Expand Down Expand Up @@ -634,6 +641,9 @@ <h1 style="display: flex; align-items: center;">
editSpan.id = `editSpan${i}`;
editSpan.onclick = function() {loadForEdit(i)};
editSpan.setAttribute('title', `Copy slot ${i} palette to editor`);
if (paletteArray[i].name) {
editSpan.setAttribute('title', `Copy ${paletteArray[i].name} palette to editor`);
}
editSpan.innerHTML = svgEdit;
editSpan.classList.add("editSpan")

Expand Down
617 changes: 311 additions & 306 deletions wled00/html_cpal.h

Large diffs are not rendered by default.

1,568 changes: 784 additions & 784 deletions wled00/html_other.h

Large diffs are not rendered by default.

998 changes: 524 additions & 474 deletions wled00/html_pixart.h

Large diffs are not rendered by default.

630 changes: 315 additions & 315 deletions wled00/html_pxmagic.h

Large diffs are not rendered by default.

338 changes: 169 additions & 169 deletions wled00/html_settings.h

Large diffs are not rendered by default.

2,262 changes: 1,131 additions & 1,131 deletions wled00/html_simple.h

Large diffs are not rendered by default.

1,980 changes: 990 additions & 990 deletions wled00/html_ui.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wled00/improv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void sendImprovInfoResponse() {
//Use serverDescription if it has been changed from the default "WLED", else mDNS name
bool useMdnsName = (strcmp(serverDescription, "WLED") == 0 && strlen(cmDNS) > 0);
char vString[20];
sprintf_P(vString, PSTR("0.14.1-b3/%i"), VERSION);
sprintf_P(vString, PSTR("0.14.1/%i"), VERSION);
const char *str[4] = {"WLED", vString, bString, useMdnsName ? cmDNS : serverDescription};

sendImprovRPCResult(ImprovRPCType::Request_Info, 4, str);
Expand Down
4 changes: 2 additions & 2 deletions wled00/udp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ void handleNotifications()
if (realtimeOverride && !(realtimeMode && useMainSegmentOnly)) return;

uint16_t totalLen = strip.getLengthTotal();
if (udpIn[0] == 1) //warls
if ((udpIn[0] == 1) && (packetSize > 5)) //warls - avoiding infinite "for" loop (unsigned underflow)
{
for (size_t i = 2; i < packetSize -3; i += 4)
{
Expand All @@ -540,7 +540,7 @@ void handleNotifications()

id++; if (id >= totalLen) break;
}
} else if (udpIn[0] == 3) //drgbw
} else if ((udpIn[0] == 3) && (packetSize > 5)) //drgbw - avoiding infinite "for" loop (unsigned underflow)
{
uint16_t id = 0;
for (size_t i = 2; i < packetSize -3; i += 4)
Expand Down
2 changes: 1 addition & 1 deletion wled00/usermods_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
#endif

#ifdef USERMOD_KLIPPER_PERCENTAGE
#include "..\usermods\usermod_v2_klipper_percentage\usermod_v2_klipper_percentage.h"
#include "../usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.h"
#endif

#ifdef USERMOD_BOBLIGHT
Expand Down
4 changes: 2 additions & 2 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
/*
Main sketch, global variable declarations
@title WLED project sketch
@version 0.14.1-a1
@version 0.14.1
@author Christian Schwinne
*/

// version code in format yymmddb (b = daily build)
#define VERSION 2401060
#define VERSION 2401141

//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG
Expand Down

0 comments on commit bbe1062

Please sign in to comment.