蓝牙重复初始化问题

This commit is contained in:
lishuo authored and CaiYanPeng committed 2022-06-09 14:52:45 +08:00
1 parent 6b3dd70c61
commit 72f254af2a
5 files changed
+70 -102

No files matched your search

@@ -35,7 +35,7 @@ namespace Assets.Scripts.Devices.Ble
this.managerStatusChanged -= value;
}
}
WclBleManagerStatus statusEnum = WclBleManagerStatus.RadioOff;
WclBleManagerStatus statusEnum = WclBleManagerStatus.RadioOn;
internal BleMobileThread() {
var self = this;
//初始蓝牙
@@ -69,6 +69,7 @@ namespace Assets.Scripts.Devices.Ble
public void StartWatcher() {
var self = this;
statusEnum = WclBleManagerStatus.RadioOn;
if (statusEnum == WclBleManagerStatus.RadioOff)
{
BluetoothLEHardwareInterface.BluetoothEnable(true);