蓝牙调用调整

This commit is contained in:
lishuo committed 2021-06-04 19:23:32 +08:00
1 parent 5671b35dce
commit 17eaccb72e
7 files changed
+111 -43

No files matched your search

+22
View File
@@ -108,6 +108,28 @@ namespace Assets.Scenes.Ride.Scripts
S = s.ToString();
return $"{H}:{M}:{S}";
}
public static string FormateMacAddress(string v)
{
try
{
var s = Convert.ToInt64(v).ToString("x8").ToUpperInvariant();
var array = s.ToCharArray();
StringBuilder newLsit = new StringBuilder();
for (int i = array.Length - 1; i >= 0; i--)
{
newLsit.Append(array[i]);
if (i % 2 == 0 && i > 0)
{
newLsit.Append(":");
}
}
return newLsit.ToString();
}
catch (Exception)
{
return v;
}
}
/// <summary>
/// 计算速度
/// 参考 http://bikecalculator.com/index.html