加ant+相关代码。

This commit is contained in:
suntao committed 2021-03-30 14:23:41 +08:00
1 parent f45711f39f
commit 3c2bb10f07
115 files changed
+9058 -405

No files matched your search

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts.Devices.Ant.Messages
{
public class FecErgMode : BaseMessage
{
private readonly int _targetPower;
public FecErgMode(byte channel, int targetPower)
: base(channel)
{
this._targetPower = targetPower;
}
public override ANTMessage GetMessage()
{
return new ANTMessage()
{
Id = (byte)79,
Size = (byte)9,
Data = new byte[9]
{
this.Channel,
(byte) 49,
byte.MaxValue,
byte.MaxValue,
byte.MaxValue,
byte.MaxValue,
byte.MaxValue,
(byte) (this._targetPower & (int) byte.MaxValue),
(byte) (this._targetPower >> 8 & (int) byte.MaxValue)
}
};
}
}
}