(ip)
| 3297 | brick: '#dc2626', // red |
| 3298 | glass: '#f8fafc', // white |
| 3299 | concrete: '#9ca3af', // grey |
| 3300 | metal: '#3b82f6', // blue (steel) |
| 3301 | drywall: '#d8c39a', // beige |
| 3302 | wood: '#8b5a2b', // brown |
| 3303 | }; |
| 3304 | const _WIFI_MAT_LABELS = { brick: 'Brick', glass: 'Glass', concrete: 'Concrete', |
| 3305 | metal: 'Steel', drywall: 'Drywall', wood: 'Wood' }; |
| 3306 | function _wifiMatColor(mat) { return _WIFI_MAT_COLORS[mat] || '#0ea5e9'; } |
| 3307 | |
| 3308 | // Calibrated metric scales: [lo (red), hi (green)] and labelled break points. |
| 3309 | // (For latency, lo>hi so lower = greener.) |
| 3310 | const _WIFI_HM_METRICS = { |
| 3311 | rssi: { lo: -90, hi: -30, unit: 'dBm', field: 'rssi', |
| 3312 | marks: [[-30, 'excellent'], [-67, 'good'], [-72, 'fair'], [-80, 'weak'], [-90, 'dead']] }, |
| 3313 | snr: { lo: 5, hi: 40, unit: 'dB', field: 'snr', |
| 3314 | marks: [[40, 'excellent'], [25, 'good'], [15, 'fair'], [10, 'marginal'], [5, 'unusable']] }, |
| 3315 | throughput_down: { lo: 0, hi: 500, unit: 'Mbps', field: 'down_mbps', |
| 3316 | marks: [[500, 'excellent'], [200, 'great'], [50, 'ok'], [10, 'weak'], [1, 'poor']] }, |
| 3317 | throughput_up: { lo: 0, hi: 300, unit: 'Mbps', field: 'up_mbps', |
no test coverage detected