蓝牙停止扫描和一些bug修复
This commit is contained in:
1 parent
0139cbc173
commit
d8927ceca5
16 files changed
+137
-71
No files matched your search
@@ -477,6 +477,10 @@ namespace Assets.Scripts.Ble
|
||||
hwInterface = null;
|
||||
pCache.Clear();
|
||||
}
|
||||
public void StopScan()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ReadCharacteristic(BleCharacteristicInfo characteristic, CharacteristicReadCallback callback)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Assets.Scripts.Devices.Ble.Win
|
||||
{
|
||||
this.wclWatcher.StopScan();
|
||||
}
|
||||
//this.StopGattThreads();
|
||||
this.StopGattThreads();
|
||||
if (this.wclBleManager.Active)
|
||||
{
|
||||
this.wclBleManager.ManagerStatusChanged = null;
|
||||
@@ -119,6 +119,14 @@ namespace Assets.Scripts.Devices.Ble.Win
|
||||
status,
|
||||
});
|
||||
}
|
||||
public void StopGattThreads()
|
||||
{
|
||||
Debug.Log("停止thread");
|
||||
foreach (var item in this.gattClients.Values)
|
||||
{
|
||||
item.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Stop()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user