HUB75 hack-the-DOM

* Reversed -> mxconfig.clkphase ; "Inverted clock phase"
* Off Refresh -> mxconfig.latch_blanking = 1; "Single-cycle latch blanking"
This commit is contained in:
Frank
2024-11-07 00:06:46 +01:00
parent 7fb3fe65b2
commit cbd1ce4705
2 changed files with 12 additions and 5 deletions

View File

@@ -593,8 +593,13 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
// mxconfig.latch_blanking = 3; // use in case you see gost images
// mxconfig.i2sspeed = HUB75_I2S_CFG::HZ_10M; // experimental - 5MHZ should be enugh, but colours looks slightly better at 10MHz
// mxconfig.min_refresh_rate = 90;
mxconfig.clkphase = false; // can help in case that the leftmost column is invisible, or pixels on the right side "bleeds out" to the left.
mxconfig.clkphase = bc.reversed;
if (bc.refreshReq) mxconfig.latch_blanking = 1; // needed for some ICS panels (default = 2)
// fake bus flags
_needsRefresh = mxconfig.latch_blanking == 1;
reversed = mxconfig.clkphase;
// How many panels we have connected, cap at sane value
mxconfig.chain_length = max((uint8_t) 1, min(bc.pins[0], (uint8_t) 4)); // prevent bad data preventing boot due to low memory

View File

@@ -221,12 +221,14 @@
gId("dig"+n+"w").style.display = (t > 28 && t < 32) ? "inline":"none"; // show swap channels dropdown
if (!(t > 28 && t < 32)) d.getElementsByName("WO"+n)[0].value = 0; // reset swapping
gId("dig"+n+"c").style.display = ((t >= 40 && t < 48)||(t >= 100 && t < 110)) ? "none":"inline"; // hide count for analog and HUB75
gId("dig"+n+"r").style.display = (t >= 80) ? "none":"inline"; // hide reversed for virtual
gId("dig"+n+"r").style.display = (t >= 80) && (t < 100) ? "none":"inline"; // hide reversed for virtual, except for HUB75
gId("dig"+n+"s").style.display = ((t >= 80) || (t >= 40 && t < 48)) ? "none":"inline"; // hide skip 1st for virtual & analog
gId("dig"+n+"f").style.display = ((t >= 16 && t < 32) || (t >= 50 && t < 64)) ? "inline":"none"; // hide refresh
gId("dig"+n+"f").style.display = ((t >= 16 && t < 32) || (t >= 50 && t < 64)||(t >= 100 && t < 110)) ? "inline":"none"; // hide refresh, except for HUB75
gId("dig"+n+"a").style.display = (isRGBW && t != 40) ? "inline":"none"; // auto calculate white
gId("dig"+n+"l").style.display = ((t > 48 && t < 64) && !(t >= 100 && t < 110)) ? "inline":"none"; // bus clock speed
gId("rev"+n).innerHTML = (t >= 40 && t < 48) ? "Inverted output":"Reversed (rotated 180°)"; // change reverse text for analog
if (t >= 100 && t < 110) gId("rev"+n).innerHTML = "Inverted clock phase"; // change "reverse" text for HUB75
if (t >= 100 && t < 110) gId("ref"+n).innerHTML = "Single-cycle latch blanking"; // change "off refresh" text for HUB75
gId("psd"+n).innerHTML = (t >= 40 && t < 48) ? "Index:":"Start:"; // change analog start description
}
}
@@ -413,7 +415,7 @@ ${i+1}:
<span id="p4d${i}"></span><input type="number" name="L4${i}" class="s" onchange="UI()"/>
<div id="dig${i}r" style="display:inline"><br><span id="rev${i}">Reversed</span>: <input type="checkbox" name="CV${i}"></div>
<div id="dig${i}s" style="display:inline"><br>Skip first LEDs: <input type="number" name="SL${i}" min="0" max="255" value="0" oninput="UI()"></div>
<div id="dig${i}f" style="display:inline"><br>Off Refresh: <input id="rf${i}" type="checkbox" name="RF${i}"></div>
<div id="dig${i}f" style="display:inline"><br><span id="ref${i}">Off Refresh</span>: <input id="rf${i}" type="checkbox" name="RF${i}"></div>
<div id="dig${i}a" style="display:inline"><br>Auto-calculate white channel from RGB:<br><select name="AW${i}"><option value=0>None</option><option value=1>Brighter</option><option value=2>Accurate</option><option value=3>Dual</option><option value=4>Max</option></select>&nbsp;</div>
</div>`;
f.insertAdjacentHTML("beforeend", cn);