Skip to content

Commit

Permalink
settings_leds: Init current limiter
Browse files Browse the repository at this point in the history
Supersedes previous approach; this should use less space and be more robust to future changes.
  • Loading branch information
willmmiles committed Dec 3, 2024
1 parent d620930 commit a86cb27
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 @@ -422,7 +422,7 @@
<option value="15">15mA (seed/fairy pixels)</option>
<option value="0">Custom</option>
</select><br>
<div id="LAdis${s}" style="display: none;">max. mA/LED: <input name="LA${s}" type="number" min="1" max="255" oninput="UI()" value="55"> mA<br></div>
<div id="LAdis${s}" style="display: none;">max. mA/LED: <input name="LA${s}" type="number" min="1" max="255" oninput="UI()"> mA<br></div>
<div id="PSU${s}">PSU: <input name="MA${s}" type="number" class="xl" min="250" max="65000" oninput="UI()" value="250"> mA<br></div>
</div>
<div id="co${s}" style="display:inline">Color Order:
Expand Down Expand Up @@ -471,6 +471,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 a86cb27

Please sign in to comment.