Compare commits

..

4 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
dc85a0eaf7 Add CodeQL symlink to gitignore
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-28 10:42:49 +00:00
copilot-swe-agent[bot]
7aeee543ef Complete implementation of virtual bus size limit removal
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-28 10:42:08 +00:00
copilot-swe-agent[bot]
96f47e7f71 Remove MAX_LEDS_PER_BUS limitation for virtual buses
- Frontend: Updated settings_leds.htm to allow virtual buses up to 16384 LEDs
- Backend: Modified BusConfig::adjustBounds() to skip MAX_LEDS_PER_BUS check for virtual buses
- Tests: All npm tests pass successfully

Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-28 10:37:50 +00:00
copilot-swe-agent[bot]
9a066d286f Initial plan 2025-12-28 10:32:31 +00:00
3 changed files with 10 additions and 13 deletions

1
.gitignore vendored
View File

@@ -25,3 +25,4 @@ wled-update.sh
/wled00/Release
/wled00/wled00.ino.cpp
/wled00/html_*.h
_codeql_detected_source_root

View File

@@ -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;

View File

@@ -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)) {