设备连接微调

This commit is contained in:
lishuo committed 2021-09-15 14:17:11 +08:00
1 parent afb8c358f5
commit ad26419654
7 files changed
+55 -21

No files matched your search

@@ -90,7 +90,7 @@ public class ConnectDeviceModal : PFUIPanel
{
if (item.Value.DeviceInfo.Sensor == SensorType.SpeedCadence || item.Value.DeviceInfo.Sensor == SensorType.Cadence)
{
//Debug.Log("断开设备" + item.Value.DeviceInfo.Name);
Debug.Log("断开设备" + item.Value.DeviceInfo.Name);
item.Value.DeviceInfo.Disconnect();
DeviceCache.Remove(item.Value.DeviceInfo);
}
@@ -244,7 +244,7 @@ public class DeviceView : MonoBehaviour
mSearchButton.SetActive(false);
mPairButton.SetActive(true);
#if UNITY_IOS || UNITY_ANDROID
searchState.gameObject.SetActive(false);
//searchState.gameObject.SetActive(false);
#endif
logo.sprite = sprite1;
@@ -275,8 +275,13 @@ public class DeviceView : MonoBehaviour
//noDevice.enabled = true;
noDevice.text = connectedDevice.Name +" "+ connectedDevice.DeviceNumber.ToString();
}
#if (UNITY_IOS || UNITY_ANDROID)
mPairButton.SetActive(true);
searchState.gameObject.SetActive(true);
#endif
searchState.text = "Connecting...";
}
else if (connectedDevice.State == DeviceState.Connected)
{