c2同步课程命令

This commit is contained in:
lishuo committed 2022-06-24 18:03:36 +08:00
1 parent 701ec3069b
commit 06b9051b3c
6 files changed
+44 -21

No files matched your search

@@ -8,6 +8,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using UnityEngine;
@@ -413,10 +414,11 @@ namespace Assets.Scripts.Ble
{
this.characteristicNotificationCallbacks.Add(characteristic.Peripheral, callback);
}
Debug.Log("SubscribeCharacteristic" + characteristic.Peripheral.Name + characteristic.Service.ToString() + characteristic.Service.ToString());
Thread.Sleep(50);
Debug.Log("SubscribeCharacteristic" + characteristic.Peripheral.Name + characteristic.Service.ToString() + characteristic.Id.ToString());
BluetoothLEHardwareInterface.SubscribeCharacteristicWithDeviceAddress(characteristic.Peripheral.Address, characteristic.Service.ToString(), characteristic.Id.ToString(), (a,b)=>
{
Debug.Log("返回特征值," + a + "," + b);
Debug.Log("返回特征值," + a + "," + b+DateTime.Now.ToString());
}, (deviceAddress, characteristric, bytes) =>
{
if (characteristicReadEvent != null)