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

Function syncNodePositionsToBackend

web/rusense/app/views/settings.js:41–46  ·  view source on GitHub ↗
(positions)

Source from the content-addressed store, hash-verified

39// the 3D view; this mirrors them to the server where the alert loop can read.
40let _posSyncTimer = null;
41function syncNodePositionsToBackend(positions) {
42 clearTimeout(_posSyncTimer);
43 _posSyncTimer = setTimeout(() => {
44 req('POST', '/api/config', { rusense_node_positions: positions || {} });
45 }, 800);
46}
47
48// Node names are not just a UI label — mirror them to the backend too, so
49// server-side alerts (e.g. "node offline") can say "Living room" instead of "#2".

Callers 2

renderNodesFunction · 0.85
endFunction · 0.85

Calls 1

reqFunction · 0.70

Tested by

no test coverage detected