void OnScanControllerCallbackEvent(object sender, ScanController.EventArgs e) { //Debug.Log("OnScanControllerCallbackEvent, Type: " + e.Type + ", invoked by: " + e.InvokeMethod); switch (e.Type) { case ScanController.EventType.NEW_DEVICE: Debug.Log("OnScanControllerCallbackEvent, NEW_DEVICE with MacID: " + e.MacID + ", connecting..."); StartCoroutine(Connect(e.MacID)); break; } }
void OnScanControllerCallbackEvent(object sender, ScanController.EventArgs e) { switch (e.Type) { case ScanController.EventType.SYSTEM_SCANNING: buttonScan.GetComponentInChildren <TMP_Text>().text = "Stop scanning"; break; case ScanController.EventType.SYSTEM_NOT_SCANNING: buttonScan.GetComponentInChildren <TMP_Text>().text = "Start scanning"; break; case ScanController.EventType.NEW_DEVICE: // a new sensor was found case ScanController.EventType.RSSI: // RSSI of a sensor has changed and the MovesenseDevice sortorder has been updated case ScanController.EventType.REFRESH: // a sensor got out of reach and was removed from MovesenseDevice-list case ScanController.EventType.REMOVE_UNCONNECTED: // at scanstart all unconnected sensors are removed from MovesenseDevice-list RefreshScrollViewContentScan(); break; } }