移动端蓝牙设备正常骑行

This commit is contained in:
lishuo committed 2021-08-24 18:34:41 +08:00
1 parent d6c3ea2007
commit 3de8b1d555
7 files changed
+226 -350

No files matched your search

+3 -2
View File
@@ -266,7 +266,7 @@ public class BluetoothLEHardwareInterface
#endif
}
public static BluetoothDeviceScript Initialize (bool asCentral, bool asPeripheral, Action action, Action<string> errorAction)
public static BluetoothDeviceScript Initialize (bool asCentral, bool asPeripheral, Action action, Action<string> errorAction, Action<int> statusAction)
{
bluetoothDeviceScript = null;
@@ -289,6 +289,7 @@ public class BluetoothLEHardwareInterface
if (bluetoothDeviceScript != null)
{
bluetoothDeviceScript.BleStatusChangedAction = statusAction;
bluetoothDeviceScript.InitializedAction = action;
bluetoothDeviceScript.ErrorAction = errorAction;
}
@@ -475,7 +476,7 @@ public class BluetoothLEHardwareInterface
#endif
}
public static void ScanForPeripheralsWithServices (string[] serviceUUIDs, Action<string, string> action = null, Action<string, string, int, byte[]> actionAdvertisingInfo = null, bool rssiOnly = false, bool clearPeripheralList = true, int recordType = 0xFF)
public static void ScanForPeripheralsWithServices (string[] serviceUUIDs, Action<string, string> action = null, Action<string, string, int, string[]> actionAdvertisingInfo = null, bool rssiOnly = false, bool clearPeripheralList = true, int recordType = 0xFF)
{
#if !UNITY_EDITOR_OSX || !EXPERIMENTAL_MACOS_EDITOR
if (!Application.isEditor)