| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using UnityEngine;
- namespace SmartBowSDK
- {
- public class BluetoothDeviceConfig
- {
- public string deviceName;
- public string service;
- public string characteristicWrite;
- public string characteristicNotify;
- public static BluetoothDeviceConfig GetDefault()
- {
- BluetoothDeviceConfig config = new BluetoothDeviceConfig();
- //两个设备匹配
- config.deviceName = string.Join(" | ", new[] {
- "Bbow_20210501",
- "HOUYI Pro",
- "Pistol",
- "Pistol M9",
- "Pistol M17",
- "Rifle M416",
- "ARTEMIS Pro",//游戏弓
- "APOLLO", //KIT
- "WDF-Baseball"//棒球
- });
- if (Application.platform == RuntimePlatform.Android)
- {
- config.service = "0000fff0";
- config.characteristicWrite = "0000fff2";
- config.characteristicNotify = "0000fff1";
- }
- else if (Application.platform == RuntimePlatform.IPhonePlayer)
- {
- config.service = "fff0";
- config.characteristicWrite = "fff2";
- config.characteristicNotify = "fff1";
- }
- return config;
- }
- }
- }
|