mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 10:46:33 +00:00
Merge pull request #4336 from willmmiles/4280-limiter-not-saving
settings_leds: always initialize current limiter field (partly solves #4280 )
This commit is contained in:
commit
36e065ab4d
@ -6,7 +6,7 @@
|
|||||||
<title>LED Settings</title>
|
<title>LED Settings</title>
|
||||||
<script src="common.js" async type="text/javascript"></script>
|
<script src="common.js" async type="text/javascript"></script>
|
||||||
<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 oMaxB=1;
|
||||||
var customStarts=false,startsDirty=[];
|
var customStarts=false,startsDirty=[];
|
||||||
function off(n) { gN(n).value = -1;}
|
function off(n) { gN(n).value = -1;}
|
||||||
@ -476,6 +476,8 @@ mA/LED: <select name="LAsel${s}" onchange="enLA(this,'${s}');UI();">
|
|||||||
if (i >= maxB || twopinB >= 1) disable(sel,'option[data-type="2P"]'); // NOTE: see isD2P()
|
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()
|
disable(sel,`option[data-type^="${'A'.repeat(maxA-analogB+1)}"]`); // NOTE: see isPWM()
|
||||||
sel.selectedIndex = sel.querySelector('option:not(:disabled)').index;
|
sel.selectedIndex = sel.querySelector('option:not(:disabled)').index;
|
||||||
|
// initialize current limiter
|
||||||
|
enLA(d.Sf["LAsel"+s],s);
|
||||||
}
|
}
|
||||||
if (n==-1) {
|
if (n==-1) {
|
||||||
o[--i].remove();--i;
|
o[--i].remove();--i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user