修改其他的

This commit is contained in:
Caiyanpeng committed 2022-05-31 16:51:07 +08:00
1 parent be687d6b77
commit ff6d61a606
18 files changed
+291 -50

No files matched your search

@@ -71,7 +71,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
List<ushort> r = new List<ushort>();
for (int i = 3; i < data.Length; i += 2)
{
ushort pull = Convert.ToUInt16(Math.Round(LbsToNewton(data[i], true)));//data[i] < 10 ? (ushort)0 : Convert.ToUInt16(Math.Round(LbsToNewton(data[i], true)));
ushort pull = data[i] < 5 ? (ushort)0 : Convert.ToUInt16(Math.Round(LbsToNewton(data[i], true)));
r.Add(pull);
PullValue = pull;
}
@@ -155,23 +155,24 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
/// 平均划桨频率
/// </summary>
public int AverageStrokeRate { get; set; } = 0;
public UInt32 TotalDistance { get; set; } = 0;
public UInt16 _instantaneousPace = 0;
/// <summary>
/// 即时配速
/// </summary>
public UInt16 InstantaneousPace {
get => _instantaneousPace;
set
private UInt32 _totalDistance = 0;
public UInt32 TotalDistance
{
get => _totalDistance;
set
{
if (_instantaneousPace == 0 && value != 0 && StartEvent != null)
if (_totalDistance == 0 && value != 0 && StartEvent != null)
{
StartEvent.Invoke(null, new EventArgs());
}
_instantaneousPace = value;
}
_totalDistance = value;
}
}
//private UInt16 _instantaneousPace = 0;
/// <summary>
/// 即时配速
/// </summary>
public UInt16 InstantaneousPace { get; set; } = 0;
/// <summary>
/// 平均配速
/// </summary>
@@ -25,23 +25,24 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
/// </summary>
public int AverageStrokeRate { get; set; } = 0;
public UInt32 TotalDistance { get; set; } = 0;
public UInt16 _instantaneousPace = 0;
/// <summary>
/// 即时配速
/// </summary>
public UInt16 InstantaneousPace
private UInt32 _totalDistance = 0;
public UInt32 TotalDistance
{
get => _instantaneousPace;
get => _totalDistance;
set
{
if (_instantaneousPace == 0 && value != 0 && StartEvent != null)
if (_totalDistance == 0 && value != 0 && StartEvent != null)
{
StartEvent.Invoke(null, new EventArgs());
}
_instantaneousPace = value;
_totalDistance = value;
}
}
//private UInt16 _instantaneousPace = 0;
/// <summary>
/// 即时配速
/// </summary>
public UInt16 InstantaneousPace { get; set; } = 0;
/// <summary>
/// 平均配速
/// </summary>