修改细节
This commit is contained in:
1 parent
baab5a9fb0
commit
9a545f00f4
11 files changed
+1191
-1175
No files matched your search
@@ -70,9 +70,9 @@ namespace Assets.Scripts.Devices.Ble
|
||||
}
|
||||
if (device.SensorType == Ant.SensorType.Trainer)
|
||||
{
|
||||
//var device0 = new Ftms(device.Peripheral, hwInterface);
|
||||
//var device1 = new Ftms(device.Peripheral, hwInterface);
|
||||
//discoveredDevices.Add(device.Peripheral.Address, device0);
|
||||
|
||||
|
||||
var device1 = new Tacx(device.Peripheral, hwInterface);
|
||||
if (discoveredDevices.ContainsKey(device.Peripheral.Address))
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.Scripts.Devices.Ble.Characteristic
|
||||
{
|
||||
@@ -56,10 +57,10 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
||||
//throw new NotImplementedException();
|
||||
var responseId = data[2];
|
||||
|
||||
if (responseId != (byte)ANT_Managed_Library.ANT_ReferenceLibrary.ANTMessageID.BROADCAST_DATA_0x4E)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//if (responseId != (byte)ANT_Managed_Library.ANT_ReferenceLibrary.ANTMessageID.BROADCAST_DATA_0x4E)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
var data1 = data.Skip(3).ToArray();
|
||||
var pageNumber = data1[1];
|
||||
switch (pageNumber)
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
||||
{
|
||||
if (characteristic.MatchGuid(item.Uuid))
|
||||
{
|
||||
//Debug.Log(string.Join(",", response.Data));
|
||||
Debug.Log(string.Join(",", response.Data));
|
||||
item.HandleAttributeReceived(response.Data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,9 +85,9 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
||||
{
|
||||
foreach (var item in base.Characteristics)
|
||||
{
|
||||
if (characteristic.MatchGuid(item.Uuid) || otherGuids.Contains(item.Uuid))
|
||||
if (characteristic.MatchGuid(item.Uuid) || otherGuids.Contains(characteristic.Id))
|
||||
{
|
||||
//Debug.Log(string.Join(",", response.Data));
|
||||
Debug.Log(string.Join(",", response.Data));
|
||||
item.HandleAttributeReceived(response.Data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user