地球收藏问题,ios 蓝牙有返回值处理,划船机倒计时1时重置

This commit is contained in:
Caiyanpeng committed 2021-09-30 15:23:40 +08:00
1 parent 9511e30e50
commit 6501284bbc
9 files changed
+36 -13

No files matched your search

@@ -347,7 +347,7 @@ namespace Assets.Scripts.Ble
public void StopScan()
{
bleMobileThread.Stop();
bleMobileThread?.Stop();
}
//发现服务列表
@@ -391,8 +391,12 @@ namespace Assets.Scripts.Ble
//写入特征值
public void WriteCharacteristic(BleCharacteristicInfo characteristic, byte[] data)
{
BluetoothLEHardwareInterface.WriteCharacteristic(characteristic.Peripheral.Address, characteristic.Service.Id.ToString(), characteristic.Id.ToString(), data, data.Length, false, (characteristicUUID) => {
bool withResponse = false;
#if UNITY_IOS
withResponse = characteristic.Id.ToString().ToLower().Contains("2AD9".ToLower());
#endif
BluetoothLEHardwareInterface.WriteCharacteristic(characteristic.Peripheral.Address, characteristic.Service.Id.ToString(), characteristic.Id.ToString(), data, data.Length, withResponse, (characteristicUUID) => {
Debug.Log("相应" + characteristicUUID);
BluetoothLEHardwareInterface.Log("Write Succeeded");
});
}