MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / onDiscovered

Method onDiscovered

tests/modules/network/ble/client/rssi.js:19–24  ·  view source on GitHub ↗
(device)

Source from the content-addressed store, hash-verified

17 this.startScanning();
18 }
19 onDiscovered(device) {
20 if (device?.scanResponse?.completeName === $TESTMC.config.ble.client.targetDevice) {
21 this.stopScanning();
22 this.connect(device);
23 }
24 }
25 onConnected(device) {
26 this.device = device;
27 device.discoverPrimaryService(CONFIG.SERVICE_UUID);

Callers

nothing calls this directly

Calls 1

connectMethod · 0.45

Tested by

no test coverage detected