From fa29dc0a80207e5439b5e1dcf928cd74a4e32c46 Mon Sep 17 00:00:00 2001 From: Jari Date: Tue, 23 Jun 2026 16:20:19 -0400 Subject: [PATCH] Missing part of webusb dashboard from previous PR --- docs/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.html b/docs/index.html index bdb8cd7..0a75adb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -467,11 +467,12 @@ function applyBlob(p){ : "—"; setSlider("mDiv",mDiv); setSlider("mFric",mFric); setSlider("rumble",rumbleScale); $("#persistMode").textContent = persistMode? "on":"off"; $("#persistMode").classList.toggle("active",!!persistMode); - // per-type button config (blob v9): 4 types x 7 bytes from p[75] - if(p.length>=75+TYPE_DEFS.length*7){ + // per-type button config (blob v9): 4 types x 7 bytes. readBlob() strips the 2-byte [0xA5][len] header, so + // the firmware's payload byte 75 lands at JS index 73 here. + if(p.length>=73+TYPE_DEFS.length*7){ const activeEt=etypeForMode(mode); typeEls.forEach((rec,et)=>{ - const q=75+et*7; + const q=73+et*7; const back=[p[q],p[q+1],p[q+2],p[q+3]], qam=p[q+4], ab=p[q+5], pad=p[q+6]; rec.back.forEach((sel,i)=>{ if(document.activeElement!==sel) sel.value=back[i]; }); if(document.activeElement!==rec.qam) rec.qam.value=qam; -- knotmirror 0.0.1