接入基本设备

This commit is contained in:
suntao committed 2021-06-04 13:22:59 +08:00
1 parent 2f84f70a5f
commit 7729332f41
62 files changed
+2880 -86

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ namespace Assets.Scripts.Devices.Ant
public readonly byte uid;
public DataSourceBase(racerSportType sportType, bool isHuman)
public DataSourceBase(racerSportType sportType, bool isHuman):base(NetworkType.ANT)
{
this.sportType = sportType;
this.isHuman = isHuman;
+1 -1
View File
@@ -9,7 +9,7 @@ using UnityEngine;
namespace Assets.Scripts.Devices.Ant
{
public class FitDevice : AbstractAntDevice, ISpeedDevice, IPowerDevice, ICadenceDevice, IRequiresRiderWeight
public class FitDevice : AbstractAntDevice, ISpeedDevice, IPowerDevice, ICadenceDevice, IRequiresRiderWeight, ITrainerDevice
{
public const int MAX_NO_EVENT_STOP_COUNT = 12;
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts.Devices.Ant.Interfaces
{
public interface ITrainerDevice
{
void SetErgMode(int targetPower);
void SetResistanceMode(double value);
void SetWindResistance(double? height = null);
void SetTrackResistance(double grade);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 362cacfc69d803d478112e7c293cfa17
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+6
View File
@@ -39,4 +39,10 @@ namespace Assets.Scripts.Devices.Ant
Trainer,
VirtualPower,
}
public enum NetworkType
{
BLE,
ANT
}
}