mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-07-30 07:49:18 +02:00
change bars
This commit is contained in:
@@ -163,9 +163,9 @@
|
|||||||
const POLL_MSG = JSON.stringify({ action: "fm95", data: "/w==" });
|
const POLL_MSG = JSON.stringify({ action: "fm95", data: "/w==" });
|
||||||
const FIELDS = ['mpx_power','bs412_gain','agc_gain','input_level','audio_level'];
|
const FIELDS = ['mpx_power','bs412_gain','agc_gain','input_level','audio_level'];
|
||||||
const FIELD_CFG = {
|
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 },
|
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:'', fmt: v=>v.toFixed(4), bar: v=>Math.max(0,Math.min(100,v*50)), warn: v=>v>2 },
|
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:'', fmt: v=>v.toFixed(4), bar: v=>Math.max(0,Math.min(100,v*50)), 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 ---
|
// --- Oscilloscope state ---
|
||||||
@@ -326,7 +326,7 @@ function connect() {
|
|||||||
ws.addEventListener('open', () => {
|
ws.addEventListener('open', () => {
|
||||||
setStatus('connected', 'Connected');
|
setStatus('connected', 'Connected');
|
||||||
poll();
|
poll();
|
||||||
pollTimer = setInterval(poll, 100);
|
pollTimer = setInterval(poll, 50 + (Math.random() * 50));
|
||||||
});
|
});
|
||||||
ws.addEventListener('message', e => {
|
ws.addEventListener('message', e => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user