开放划船机,增加阻力设置
This commit is contained in:
1 parent
c12df53c18
commit
7c1d1e797c
13 files changed
+2376
-1642
No files matched your search
@@ -11,5 +11,6 @@ namespace Assets.Scripts.Devices.Ant.Interfaces
|
||||
{
|
||||
FtmsRowerData rowerData { get; }
|
||||
void Reset();
|
||||
void SetResistanceLevel(ushort v);
|
||||
}
|
||||
}
|
||||
@@ -77,5 +77,11 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
||||
Debug.Log("发送重置命令"+this.controlPointCharacteristic.ToString());
|
||||
hwInterface.WriteCharacteristic(this.controlPointCharacteristic, new byte[] { 0x01 });
|
||||
}
|
||||
public void SetResistanceLevel(ushort v)
|
||||
{
|
||||
var r = new byte[] { 0x04 }.Concat(BitConverter.GetBytes(v)).ToArray();
|
||||
Debug.Log($"设置阻力{v}, {string.Join(",", r)}");
|
||||
hwInterface.WriteCharacteristic(this.controlPointCharacteristic, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user