日志包

This commit is contained in:
Caiyanpeng committed 2022-06-02 15:52:10 +08:00
1 parent 71c9907c89
commit d498dd9148
6 files changed
+52 -25

No files matched your search

@@ -127,8 +127,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
//}
var output = "";
output += "收到消息:" + string.Join("\t", data);
Debug.Log(output);
this.Flags = (RowerDataFlag)BitConverter.ToUInt16(data, 0);
int b = 2;
if (!this.MoreDataFlag)
@@ -156,6 +155,10 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
{
var vvv = BitConvertHelper.ToUInt24(data, (int)b);
output += $" 总距离{ vvv }米";
if (vvv < 10)
{
App.cacheList.Add(DateTime.Now.ToString() + ":" + output);
}
b += this.SizeOfDataForFlag(RowerDataFlag.TotalDistance);
this.TotalDistance = vvv;
@@ -258,7 +261,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
}
pullList.Add(pull);
}
Debug.Log("拉力:" + string.Join(",",list));
//Debug.Log("拉力:" + string.Join(",",list));
}
}
List<ushort> pullList;
@@ -267,7 +270,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
this.StrokeRate = 0;
this.StrokeCount = 0;
this.AverageStrokeRate = 0;
this.TotalDistance = 0;
//this.TotalDistance = 0;
this.InstantaneousPace = 0;
this.AveragePace = 0;
this.InstantaneousPower = 0;
@@ -188,6 +188,7 @@ namespace Assets.Scripts.Devices.Ble.Devices
if (this.controlPointCharacteristic != null)
{
Debug.Log("发送重置命令" + this.controlPointCharacteristic.ToString());
App.cacheList.Add(DateTime.Now.ToString() + ":发送重置命令" + this.controlPointCharacteristic.ToString());
hwInterface.WriteCharacteristic(this.controlPointCharacteristic, new byte[] { 0x01 });
}
}