Skip to content

Commit

Permalink
Merge wled/master into SR-WLED Release v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
THATDONFC committed Apr 5, 2021
2 parents 6bdf285 + ecdc0a3 commit 76bdb99
Show file tree
Hide file tree
Showing 18 changed files with 713 additions and 731 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
## WLED changelog

### Builds after release 0.12.0

#### Build 2104030

- Fixed ESP32 crash on Drip effect with reversed segment (#1854)
- Added flag `WLED_DISABLE_BROWNOUT_DET` to disable ESP32 brownout detector (off by default)

### WLED release 0.12.0

#### Build 2104020

- Allow clearing button/IR/relay pin on platforms that don't support negative numbers
- Removed AUX pin
- Hid some easter eggs, only to be found at easter

### Development versions between 0.11.1 and 0.12.0 releases

#### Build 2103310

- Version bump to 0.12.0 "Hikari"
- Fixed LED settings submission in iOS app

#### Build 2103300

- Version bump to 0.12.0-b5 "Hikari"
Expand Down
4 changes: 2 additions & 2 deletions 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.12.0-b5",
"version": "0.12.0",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control
- Segments to set different effects and colors to parts of the LEDs
- Settings page - configuration over network
- Access Point and station mode - automatic failsafe AP
- Up to 10 LED outputs per instance
- Support for RGBW strips
- Up to 250 user presets to save and load colors/effects easily, supports cycling through them.
- Presets can be used to automatically execute API calls
Expand Down
9 changes: 5 additions & 4 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3081,7 +3081,7 @@ uint16_t WS2812FX::mode_drip(void)
gravity *= SEGLEN;
int sourcedrop = 12;

for (int j=0;j<numDrops;j++) {
for (uint8_t j=0;j<numDrops;j++) {
if (drops[j].colIndex == 0) { //init
drops[j].pos = SEGLEN-1; // start at end
drops[j].vel = 0; // speed
Expand All @@ -3092,7 +3092,7 @@ uint16_t WS2812FX::mode_drip(void)
setPixelColor(SEGLEN-1,color_blend(BLACK,SEGCOLOR(0), sourcedrop));// water source
if (drops[j].colIndex==1) {
if (drops[j].col>255) drops[j].col=255;
setPixelColor(int(drops[j].pos),color_blend(BLACK,SEGCOLOR(0),drops[j].col));
setPixelColor(uint16_t(drops[j].pos),color_blend(BLACK,SEGCOLOR(0),drops[j].col));

drops[j].col += map(SEGMENT.speed, 0, 255, 1, 6); // swelling

Expand All @@ -3107,8 +3107,9 @@ uint16_t WS2812FX::mode_drip(void)
if (drops[j].pos < 0) drops[j].pos = 0;
drops[j].vel += gravity;

for (int i=1;i<7-drops[j].colIndex;i++) { // some minor math so we don't expand bouncing droplets
setPixelColor(int(drops[j].pos)+i,color_blend(BLACK,SEGCOLOR(0),drops[j].col/i)); //spread pixel with fade while falling
for (uint16_t i=1;i<7-drops[j].colIndex;i++) { // some minor math so we don't expand bouncing droplets
uint16_t pos = uint16_t(drops[j].pos) +i; //this is BAD, returns a pos >= SEGLEN occasionally
setPixelColor(pos,color_blend(BLACK,SEGCOLOR(0),drops[j].col/i)); //spread pixel with fade while falling
}

if (drops[j].colIndex > 2) { // during bounce, some water is on the floor
Expand Down
2 changes: 1 addition & 1 deletion wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void WS2812FX::setPixelColor(uint16_t i, byte r, byte g, byte b, byte w)
uint16_t realIndex = realPixelIndex(i);

for (uint16_t j = 0; j < SEGMENT.grouping; j++) {
int16_t indexSet = realIndex + (reversed ? -j : j);
int indexSet = realIndex + (reversed ? -j : j);
if (indexSet < customMappingSize) indexSet = customMappingTable[indexSet];
if (indexSet >= SEGMENT.start && indexSet < SEGMENT.stop) {
busses.setPixelColor(indexSet + skip, col);
Expand Down
27 changes: 0 additions & 27 deletions wled00/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,31 +105,4 @@ void handleIO()
}
offMode = true;
}

//output
if (auxPin>=1 && (auxActive || auxActiveBefore))
{
if (!auxActiveBefore)
{
auxActiveBefore = true;
switch (auxTriggeredState)
{
case 0: pinMode(auxPin, INPUT); break;
case 1: pinMode(auxPin, OUTPUT); digitalWrite(auxPin, HIGH); break;
case 2: pinMode(auxPin, OUTPUT); digitalWrite(auxPin, LOW); break;
}
auxStartTime = millis();
}
if ((millis() - auxStartTime > auxTime*1000 && auxTime != 255) || !auxActive)
{
auxActive = false;
auxActiveBefore = false;
switch (auxDefaultState)
{
case 0: pinMode(auxPin, INPUT); break;
case 1: pinMode(auxPin, OUTPUT); digitalWrite(auxPin, HIGH); break;
case 2: pinMode(auxPin, OUTPUT); digitalWrite(auxPin, LOW); break;
}
}
}
}
3 changes: 0 additions & 3 deletions wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,6 @@ void serializeConfig() {
//JsonObject hw_status = hw.createNestedObject("status");
//hw_status["pin"] = -1;

JsonObject hw_aux = hw.createNestedObject("aux");
hw_aux["pin"] = auxPin;

// Sound Reactive Pin Config
JsonObject hw_amic = hw.createNestedObject("analogmic");
hw_amic["pin"] = audioPin;
Expand Down
1 change: 1 addition & 0 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ function loadBg(iUrl) {
if (iUrl == "") {
var today = new Date();
if (today.getMonth() == 11 && (today.getDate() > 23 && today.getDate() < 28)) img.src = "https://aircoookie.github.io/xmas.png";
else if (today.getMonth() == 3 && (today.getDate() > 3 && today.getDate() < 6)) img.src = "https://aircoookie.github.io/easter.png";
}
img.addEventListener('load', (event) => {
var a = parseFloat(cfg.theme.alpha.bg);
Expand Down
23 changes: 14 additions & 9 deletions wled00/data/settings_leds.htm
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
{
window.open("/settings","_self");
}
function off(n){
d.getElementsByName(n)[0].value = -1;
}
function bLimits(b,p,m) {
maxB = b; maxM = m; maxPB = p;
}
function trySubmit() {
function trySubmit(event) {
event.preventDefault();
var LCs = d.getElementsByTagName("input");
for (i=0; i<LCs.length; i++) {
var nm = LCs[i].name.substring(0,2);
Expand All @@ -36,6 +40,7 @@
}
}
if (bquot > 100) {var msg = "Too many LEDs for me to handle!"; if (maxM < 10000) msg += " Consider using an ESP32."; alert(msg); return;}
if (d.Sf.checkValidity()) d.Sf.submit(); //https://stackoverflow.com/q/37323914
if (d.Sf.reportValidity()) d.Sf.submit();
}
function S(){GetV();setABL();}
Expand Down Expand Up @@ -268,9 +273,9 @@
</style>
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post">
<form id="form_s" name="Sf" method="post" onsubmit="trySubmit(event)">
<div class="helpB"><button type="button" onclick="H()">?</button></div>
<button type="button" onclick="B()">Back</button><button type="button" onclick="trySubmit()">Save</button><hr>
<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr>
<h2>LED &amp; Hardware setup</h2>
Total LED count: <input name="LC" type="number" min="1" max="8192" oninput="UI()" required><br>
<i>Recommended power supply for brightest white:</i><br>
Expand Down Expand Up @@ -318,11 +323,11 @@ <h3>Hardware setup</h3>
<div id="ledwarning" style="color: orange; display: none;">
&#9888; You might run into stability or lag issues.<br>
Use less than <span id="wreason">800 LEDs per pin</span> for the best experience!<br>
</div><br>
Relay pin: <input type="number" min="-1" max="40" name="RL" onchange="UI()"> Active high <input type="checkbox" name="RM"><br>
Button pin: <input type="number" min="-1" max="40" name="BT" onchange="UI()"><br>
IR pin: <input type="number" min="-1" max="40" name="IR" onchange="UI()"><br>
AUX pin: <input type="number" min="-1" max="40" name="AX" onchange="UI()">
</div>
Button pin: <input type="number" min="-1" max="40" name="BT" onchange="UI()"><span style="cursor: pointer;" onclick="off('BT')">&nbsp;&#215;</span><br>
IR pin: <input type="number" min="-1" max="40" name="IR" onchange="UI()"><span style="cursor: pointer;" onclick="off('IR')">&nbsp;&#215;</span><br>
Relay pin: <input type="number" min="-1" max="40" name="RL" onchange="UI()"><span style="cursor: pointer;" onclick="off('RL')">&nbsp;&#215;</span><br>
Active high <input type="checkbox" name="RM">
<h3>Defaults</h3>
Turn LEDs on after power up/reset: <input type="checkbox" name="BO"><br>
Default brightness: <input name="CA" type="number" min="0" max="255" required> (0-255)<br><br>
Expand Down Expand Up @@ -365,7 +370,7 @@ <h3>Advanced</h3>
<option value=4>Legacy</option>
</select>
<br></span><hr>
<button type="button" onclick="B()">Back</button><button type="button" onclick="trySubmit()">Save</button>
<button type="button" onclick="B()">Back</button><button type="submit">Save</button>
</form>
</body>
</html>
1 change: 1 addition & 0 deletions wled00/data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ button {
font-size: 20px;
margin: 8px;
margin-top: 12px;
cursor: pointer;
}
button.disabled, button[disabled] {
color: #aaa;
Expand Down
2 changes: 1 addition & 1 deletion wled00/html_other.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function B(){window.history.back()}function U(){document.getElementById("uf").st
.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none}
</style></head><body><h2>WLED Software Update</h2><form method="POST"
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()">
Installed version: 0.12.0-b5<br>Download the latest binary: <a
Installed version: 0.12.0<br>Download the latest binary: <a
href="https://github.com/atuline/WLED/releases" target="_blank"><img
src="https://img.shields.io/github/release/atuline/WLED.svg?style=flat-square">
</a><br><input type="file" class="bt" name="update" accept=".bin" required><br>
Expand Down
Loading

0 comments on commit 76bdb99

Please sign in to comment.