diff --git a/wled00/data/settings_um.htm b/wled00/data/settings_um.htm index d0dd98f3d2..a2d867bef3 100644 --- a/wled00/data/settings_um.htm +++ b/wled00/data/settings_um.htm @@ -10,6 +10,8 @@ d.um_p = []; d.rsvd = []; d.ro_gpio = []; + d.h_pins = []; + d.x_pins = []; var umCfg = {}; var pins = [], pinO = [], owner; var loc = false, locip; @@ -56,6 +58,8 @@ // function check(o,k) {} //WLEDMM not needed as we use dropdowns function getPins(o) { if (isO(o)) { + // If this object is a bus instance, extract the "type" field + let busType = o.type !== undefined ? o.type : -1; for (const [k,v] of Object.entries(o)) { if (isO(v)) { owner = k; @@ -63,6 +67,10 @@ continue; } if (k.replace("[]","").substr(-3)=="pin") { + // Skip pin arrays for special bus types where pin array doesn't contain GPIO numbers, but allow all other entries + if (busType >= 80 && busType < 96) continue; // Network buses - pin array stores IP address + if (busType >= 100 && busType <= 110) continue; // HUB75 buses - pin array stores chain length + if (Array.isArray(v)) { for (var i=0; i=0) { pins.push(v[i]); pinO.push(owner); } } else { @@ -269,6 +277,8 @@ // console.log("pinPost option", c, c.value, d.ro_gpio.includes(c.value)); for (let j=0; j max_gpio if (c.value > d.max_gpio) { select.removeChild(c); @@ -278,7 +288,7 @@ //https://www.javascripttutorial.net/javascript-dom/javascript-remove-items-from-a-select-conditionally/ if (c.text.length <= 4) c.text += " 🟢"; //2 digit number space and ⍼/⎌. If no reserved/read only/other um, then pin can be freely used (green) for (let jj=0; jj