解决c2表头设定课程后抖动问题,设备断开失败问题

This commit is contained in:
lishuo committed 2022-06-15 16:42:07 +08:00
1 parent 0202814f67
commit 610c98f9b8
5 files changed
+18 -10

No files matched your search

+1 -1
View File
@@ -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