From cff1aa97adc60e2052cc5061aa3ae65068f716c8 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 10 May 2026 11:01:54 +0200 Subject: [PATCH] change bars --- modules/web/fm95.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/web/fm95.html b/modules/web/fm95.html index 19e7d6a..0f04d92 100644 --- a/modules/web/fm95.html +++ b/modules/web/fm95.html @@ -163,9 +163,9 @@ const POLL_MSG = JSON.stringify({ action: "fm95", data: "/w==" }); const FIELDS = ['mpx_power','bs412_gain','agc_gain','input_level','audio_level']; const FIELD_CFG = { - mpx_power: { unit:'dB', fmt: v=>v.toFixed(2), bar: v=>Math.max(0,Math.min(100,(v/3)*100)), warn: v=>v>3 }, - bs412_gain: { unit:'', fmt: v=>v.toFixed(4), bar: v=>Math.max(0,Math.min(100,v*50)), warn: v=>v>2 }, - agc_gain: { unit:'', fmt: v=>v.toFixed(4), bar: v=>Math.max(0,Math.min(100,v*50)), warn: v=>v>2 }, + mpx_power: { unit:'dB', fmt: v=>v.toFixed(3), bar: v=>Math.max(0,Math.min(100,(v/3)*100)), warn: v=>v>3 }, + bs412_gain: { unit:'x', fmt: v=>v.toFixed(4), bar: v=>Math.max(0,Math.min(100,v*100)), warn: v=>v>2 }, + agc_gain: { unit:'x', fmt: v=>v.toFixed(4), bar: v=>Math.max(0,Math.min(100,v*100)), warn: v=>v>2 }, }; // --- Oscilloscope state --- @@ -326,7 +326,7 @@ function connect() { ws.addEventListener('open', () => { setStatus('connected', 'Connected'); poll(); - pollTimer = setInterval(poll, 100); + pollTimer = setInterval(poll, 50 + (Math.random() * 50)); }); ws.addEventListener('message', e => { try {