mirror of
https://github.com/wled/WLED.git
synced 2025-12-28 10:58:35 +00:00
Compare commits
4 Commits
nightly
...
copilot/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc85a0eaf7 | ||
|
|
7aeee543ef | ||
|
|
96f47e7f71 | ||
|
|
9a066d286f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,3 +25,4 @@ wled-update.sh
|
||||
/wled00/Release
|
||||
/wled00/wled00.ino.cpp
|
||||
/wled00/html_*.h
|
||||
_codeql_detected_source_root
|
||||
|
||||
@@ -451,7 +451,7 @@ struct BusConfig {
|
||||
//validates start and length and extends total if needed
|
||||
bool adjustBounds(uint16_t& total) {
|
||||
if (!count) count = 1;
|
||||
if (count > MAX_LEDS_PER_BUS) count = MAX_LEDS_PER_BUS;
|
||||
if (!Bus::isVirtual(type) && count > MAX_LEDS_PER_BUS) count = MAX_LEDS_PER_BUS;
|
||||
if (start >= MAX_LEDS) return false;
|
||||
//limit length of strip if it would exceed total permissible LEDs
|
||||
if (start + count > MAX_LEDS) count = MAX_LEDS - start;
|
||||
|
||||
@@ -330,33 +330,29 @@
|
||||
}
|
||||
// do we have a led count field
|
||||
if (nm=="LC") {
|
||||
if (!isHub75(t)) {
|
||||
LC.max = isAna(t) ? 1 : (isDig(t) ? maxPB : 16384); // set max value
|
||||
} else {
|
||||
LC.min = undefined;
|
||||
LC.max = undefined;
|
||||
}
|
||||
let c = parseInt(LC.value,10); //get LED count
|
||||
if (!customStarts || !startsDirty[toNum(n)]) gId("ls"+n).value = sLC; //update start value
|
||||
gId("ls"+n).disabled = !customStarts; //enable/disable field editing
|
||||
if (c) {
|
||||
let s = parseInt(gId("ls"+n).value); //start value
|
||||
if (s+c > sLC) sLC = s+c; //update total count
|
||||
if (c > maxLC) maxLC = c; //max per output
|
||||
if (!isVir(t)) sPC += c; //virtual out busses do not count towards physical LEDs
|
||||
if (isDig(t)) {
|
||||
if (c > maxLC) maxLC = c; //max per output
|
||||
sDI += c; // summarize digital LED count
|
||||
let maPL = parseInt(d.Sf["LA"+n].value);
|
||||
if (maPL == 255) maPL = 12;
|
||||
if (maPL == 255) maPL = 12; // wacky WS2815 mode (255 == 12mA per LED)
|
||||
busMA += maPL*c; // summarize maximum bus current (calculated)
|
||||
}
|
||||
} // increase led count
|
||||
return;
|
||||
}
|
||||
// do we have led pins for digital leds
|
||||
if (nm=="L0" || nm=="L1") {
|
||||
if (!isHub75(t)) {
|
||||
d.Sf["LC"+n].max = maxPB; // update max led count value
|
||||
}
|
||||
else {
|
||||
d.Sf["LC"+n].min = undefined;
|
||||
d.Sf["LC"+n].max = undefined;
|
||||
}
|
||||
}
|
||||
// ignore IP address (stored in pins for virtual busses)
|
||||
if (nm.search(/^L[0-3]/) == 0) { // pin fields
|
||||
if (isVir(t)) {
|
||||
|
||||
Reference in New Issue
Block a user