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

Method onStateChange

web/rusense/services/sensing.service.js:90–94  ·  view source on GitHub ↗

Register a callback for connection state changes. Returns unsubscribe fn.

(callback)

Source from the content-addressed store, hash-verified

88
89 /** Register a callback for connection state changes. Returns unsubscribe fn. */
90 onStateChange(callback) {
91 this._stateListeners.add(callback);
92 callback(this._state);
93 return () => this._stateListeners.delete(callback);
94 }
95
96 /** Get the RSSI sparkline history (array of floats). */
97 getRssiHistory() {

Callers

nothing calls this directly

Calls 3

addMethod · 0.80
callbackFunction · 0.50
deleteMethod · 0.45

Tested by

no test coverage detected