加ant+相关代码。
This commit is contained in:
1 parent
f45711f39f
commit
3c2bb10f07
115 files changed
+9058
-405
No files matched your search
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scripts.Devices.Ant.Pages.CalibrationPages
|
||||
{
|
||||
internal class FecCalibrationPage : ICalibrationPage
|
||||
{
|
||||
public bool CanHandle(byte calibrationId)
|
||||
{
|
||||
return (int)calibrationId == 20;
|
||||
}
|
||||
|
||||
public void Handle(byte[] dataPayload, AbstractAntDevice device)
|
||||
{
|
||||
var fecDevice = device as FitDevice;
|
||||
if (fecDevice == null)
|
||||
return;
|
||||
|
||||
var offset = (int)(short)((int)dataPayload[7] | (int)dataPayload[6] << 8);
|
||||
|
||||
fecDevice.DoCalibrationSuccess(offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user