修改设备图标。连接设备加缓存功能。

This commit is contained in:
suntao committed 2021-04-30 18:03:34 +08:00
1 parent 6399c26f7e
commit 9f4e446850
33 files changed
+594 -971

No files matched your search

+13 -1
View File
@@ -1,5 +1,6 @@
using Assets.Scripts;
using Assets.Scripts.Devices.Ant;
using Assets.Scripts.UI.Prefab.Device;
using Mapbox.Examples;
using System.Collections;
using System.Collections.Generic;
@@ -15,8 +16,19 @@ public class MainController : MonoBehaviour
{
Version = this.transform.Find("GameObject").Find("Version").GetComponent<Text>();
Version.text = "V"+App.AppVersion;
DeviceCache.Init(Application.dataPath);
AntConnector.Instance();
AntConnector.Instance((device2) => {
//自动连接
if (DeviceCache.Exist(device2))
{
Debug.Log("自动连接" + device2.DeviceNumber);
device2.Connect();
}
});
//Debug.Log(Application.dataPath);
}
// Start is called before the first frame update