MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / updateScanProgress

Function updateScanProgress

web/scripts/ragnar_modern.js:4092–4112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4090}
4091
4092function wifiCalibrateReset() {
4093 _wifiState.calRssi0 = null;
4094 const st = document.getElementById('wifi-cal-status');
4095 if (st) st.textContent = 'cleared — using TX/FSPL model';
4096 if (_wifiState.selected) wifiSelectAp(_wifiState.selected);
4097}
4098
4099function _wifiDrawRadius(d) {
4100 const canvas = document.getElementById('wifi-radius-canvas'); if (!canvas) return;
4101 canvas.style.display = 'block';
4102 const dpr = window.devicePixelRatio || 1;
4103 const W = canvas.clientWidth, H = 220;
4104 canvas.width = W * dpr; canvas.height = H * dpr;
4105 const ctx = canvas.getContext('2d'); ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
4106 ctx.clearRect(0, 0, W, H);
4107 const cx = W / 2, cy = H / 2;
4108 const maxR = Math.max(...d.rings.map(r => r.radius_m));
4109 const scale = (Math.min(W, H) / 2 - 24) / maxR;
4110 const ringColors = { voice: '#22c55e', data: '#eab308', edge: '#ef4444' };
4111 [...d.rings].reverse().forEach(r => {
4112 const rad = r.radius_m * scale;
4113 ctx.beginPath(); ctx.arc(cx, cy, rad, 0, 2 * Math.PI);
4114 ctx.fillStyle = (ringColors[r.name] || '#38bdf8') + '18'; ctx.fill();
4115 ctx.strokeStyle = (ringColors[r.name] || '#38bdf8') + 'aa'; ctx.lineWidth = 1.5; ctx.stroke();

Callers 2

handleScanStartedFunction · 0.70
handleScanProgressFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected