Merge remote-tracking branch 'origin/dev_lishuo' into dev
This commit is contained in:
commit
1020632757
15 files changed
+139
-67
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Assets.Scripts.Devices.Ant;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -171,6 +172,24 @@ namespace Assets.Scripts.Ble
|
||||
return ServiceUuids.Services.Single(s => s.IdByteArray == type);
|
||||
}
|
||||
|
||||
public static Guid GetBySensor(SensorType sensor)
|
||||
{
|
||||
switch (sensor)
|
||||
{
|
||||
case SensorType.Cadence:
|
||||
case SensorType.SpeedCadence:
|
||||
return Get(ServiceUuids.CyclingSpeedCadence).IdGuid;
|
||||
case SensorType.HeartRate:
|
||||
return Get(ServiceUuids.HeartRate).IdGuid;
|
||||
case SensorType.Power:
|
||||
return Get(ServiceUuids.PowerBeam).IdGuid;
|
||||
case SensorType.Trainer:
|
||||
return Get(ServiceUuids.TacxBle).IdGuid;
|
||||
default:
|
||||
return Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class Characteristics
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user