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

Function loadStableNetworkData

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

Source from the content-addressed store, hash-verified

3121 '#fb7185', '#22d3ee', '#c084fc', '#4ade80', '#f59e0b'];
3122function _wifiMeshNodeList() {
3123 const reg = (_wifiHm.data && _wifiHm.data.mesh_nodes) || {};
3124 return Object.keys(reg).sort();
3125}
3126function _wifiMeshColor(bssid) {
3127 const list = _wifiMeshNodeList();
3128 const i = list.indexOf(bssid);
3129 return _WIFI_MESH_COLORS[(i < 0 ? 0 : i) % _WIFI_MESH_COLORS.length];
3130}
3131
3132// Building-material attenuation (dB), mirrors wifi_analyzer._WALL_MATERIALS.
3133const _WIFI_WALL_DB = { drywall: 3, wood: 4, glass: 6, brick: 10, concrete: 15, metal: 20 };
3134// Colour-code construction materials so walls/columns read at a glance.
3135const _WIFI_MAT_COLORS = {
3136 brick: '#dc2626', // red
3137 glass: '#f8fafc', // white
3138 concrete: '#9ca3af', // grey
3139 metal: '#3b82f6', // blue (steel)
3140 drywall: '#d8c39a', // beige
3141 wood: '#8b5a2b', // brown
3142};

Callers 2

initializeSocketFunction · 0.70
loadNetworkDataFunction · 0.70

Calls 5

errorMethod · 0.80
fetchAPIFunction · 0.70
addConsoleMessageFunction · 0.70

Tested by

no test coverage detected