chat.html: widen MARK/SPACE swing to 0.95/0.10 for decode margin

The binary carrier swung only 0.20-0.80; through a lossy codec that narrow gap
shrinks the margin between MARK and SPACE. Widen to 0.95 (near full scale, no
clip) and 0.10 (low but non-zero so the tone stays present for energy
detection), giving the adaptive-threshold decoder a cleaner split.
This commit is contained in:
Russell Ballestrini 2026-05-28 10:56:10 -04:00
parent 838c3426ba
commit a5979ee9c2
No known key found for this signature in database

View file

@ -452,8 +452,8 @@ var QRCode;(function(){function QR8bitByte(data){this.mode=QRMode.MODE_8BIT_BYTE
/* ============================================================== *
* constants (mirror include/zebra.h) *
* ============================================================== */
const ZEBRA_VOL_MARK = 0.80;
const ZEBRA_VOL_SPACE = 0.20;
const ZEBRA_VOL_MARK = 0.95; /* near full-scale (no clip) for max margin */
const ZEBRA_VOL_SPACE = 0.10; /* low but non-zero so the tone stays present */
/* Link baud for the whole audio modem (handshake + data). Tunable via ?baud=N
* because the WebRTC Opus path encodes in 20ms frames and smears bit edges:
* lower baud = more audio quanta per symbol = survives the smear, but slower.