Skip to content

Commit

Permalink
Merge pull request #4336 from willmmiles/4280-limiter-not-saving
Browse files Browse the repository at this point in the history
settings_leds: always initialize current limiter field (partly solves #4280 )
  • Loading branch information
softhack007 authored Dec 5, 2024
2 parents 076497e + a86cb27 commit 36e065a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wled00/data/settings_leds.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>LED Settings</title>
<script src="common.js" async type="text/javascript"></script>
<script>
var laprev=55,maxB=1,maxD=1,maxA=1,maxV=0,maxM=4000,maxPB=2048,maxL=1664,maxCO=5,maxLbquot=0; //maximum bytes for LED allocation: 4kB for 8266, 32kB for 32
var maxB=1,maxD=1,maxA=1,maxV=0,maxM=4000,maxPB=2048,maxL=1664,maxCO=5; //maximum bytes for LED allocation: 4kB for 8266, 32kB for 32
var oMaxB=1;
var customStarts=false,startsDirty=[];
function off(n) { gN(n).value = -1;}
Expand Down Expand Up @@ -476,6 +476,8 @@
if (i >= maxB || twopinB >= 1) disable(sel,'option[data-type="2P"]'); // NOTE: see isD2P()
disable(sel,`option[data-type^="${'A'.repeat(maxA-analogB+1)}"]`); // NOTE: see isPWM()
sel.selectedIndex = sel.querySelector('option:not(:disabled)').index;
// initialize current limiter
enLA(d.Sf["LAsel"+s],s);
}
if (n==-1) {
o[--i].remove();--i;
Expand Down

0 comments on commit 36e065a

Please sign in to comment.