解决c2表头设定课程后抖动问题,设备断开失败问题
This commit is contained in:
1 parent
0202814f67
commit
610c98f9b8
5 files changed
+18
-10
No files matched your search
@@ -128,7 +128,7 @@ namespace Assets.Scripts.Devices.Ble
|
||||
Debug.Log("断开设备" + this.Name);
|
||||
|
||||
//App.MainDeviceAdapter.PrintStatus();
|
||||
this.State = DeviceState.Disconnected;
|
||||
//this.State = DeviceState.Disconnected;
|
||||
|
||||
this.hwInterface.DisconnectPeripheral(this.peripheralInfo, () => {
|
||||
//App.MainDeviceAdapter.PrintStatus();
|
||||
|
||||
@@ -240,6 +240,7 @@ namespace Assets.Scripts.Ble
|
||||
IsSuccess = true,
|
||||
Error = null
|
||||
};
|
||||
PeripheralDisconnected(address, info);//连接前断开
|
||||
callback?.Invoke(self, info, s);
|
||||
this.callbacks.Remove(info);
|
||||
Debug.Log("连接成功!" + info.Name);
|
||||
@@ -341,8 +342,6 @@ namespace Assets.Scripts.Ble
|
||||
{
|
||||
characteristicsDiscoveredCallbacks.Remove(characteristicsDiscoveredCallback.First().Key);
|
||||
}
|
||||
|
||||
peripheralDisconnectedEvent(this, info, null, false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in new issue
Block a user