c2同步课程命令

This commit is contained in:
lishuo committed 2022-06-24 18:03:36 +08:00
1 parent 701ec3069b
commit 06b9051b3c
6 files changed
+44 -21

No files matched your search

@@ -70,7 +70,6 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
ElapsedTime = (int)(Convert.ToDouble(BitConvertHelper.ToUInt24(data, 1)) / 100);
TotalDistance = (uint)(Convert.ToDouble(BitConvertHelper.ToUInt24(data, 4)) / 10);
StrokeCount = BitConvertHelper.ToUInt16(data, 19);
Debug.Log("数据" + string.Join(",", data) +$" | {ElapsedTime}-{TotalDistance}");
}
else if (data[0] == 0x3d)
{
@@ -140,10 +139,11 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
}
else if (data[0] == 0x39)
{
ElapsedTime = (int)(Convert.ToDouble(BitConvertHelper.ToUInt24(data, 1)) / 100);
TotalDistance = (uint)(Convert.ToDouble(BitConvertHelper.ToUInt24(data, 4)) / 10);
ElapsedTime = (int)(Convert.ToDouble(BitConvertHelper.ToUInt24(data, 5)) / 100);
TotalDistance = (uint)(Convert.ToDouble(BitConvertHelper.ToUInt24(data, 8)) / 10);
CompleteEvent?.Invoke(this, null);
}
Debug.Log("数据" + string.Join(",", data) + $" | {ElapsedTime}-{TotalDistance}");
//else if (data[0] == 34)
//{
// isReadyStatus = data[2] == 1 || data[2] == 129;