public void ReceiveData() { if (ubwByteDataReceiver != null && ubwByteDataReceiver.IsBusy) { ubwByteDataReceiver.Abort(); } ubwDataReceiver.Run(); }
/** * Permet d'arreter la recherche */ public void StopFindDevices() { if (isDevicesSearching) { ubw.Abort(); } isDevicesSearching = false; }
void OnApplicationQuit() { Disconnect(); if (ubwDeviceFinder != null && ubwDeviceFinder.IsBusy) { ubwDeviceFinder.Abort(); } Thread.Sleep(1000); }
public void ReceiveByteData() { if (ubwDataReceiver != null && ubwDataReceiver.IsBusy) { ubwDataReceiver.Abort(); } ubwByteDataReceiver.Run(); //int maxLength = 512; //byte[] data = new byte[maxLength]; //int byteArrayLength=BTM_ReceiveByteDataFast(data, maxLength); //if(byteArrayLength==-1) //{ // Debug.Log("Error!"); //} //for(int i=0;i<byteArrayLength;i++) //{ // Debug.Log(i + ": " +(int)data[i]); //} }