修改细节
This commit is contained in:
parent
baab5a9fb0
commit
9a545f00f4
@ -1505,7 +1505,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
|
||||
type: 3}
|
||||
@ -1665,7 +1665,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
|
||||
type: 3}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -108,7 +108,7 @@ public static class App
|
||||
//Host = "http://192.168.0.101:5087/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
Host = "http://192.168.0.101:5085/";
|
||||
Host = "https://wx.powerfun.com.cn/";
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
||||
|
||||
|
||||
@ -160,7 +160,6 @@ namespace Assets.Scripts.Devices.Ant
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
|
||||
HandleTrainerDataPage(response.messageContents.Skip(1).ToArray());
|
||||
break;
|
||||
//case 80:
|
||||
|
||||
@ -70,9 +70,9 @@ namespace Assets.Scripts.Devices.Ble
|
||||
}
|
||||
if (device.SensorType == Ant.SensorType.Trainer)
|
||||
{
|
||||
//var device0 = new Ftms(device.Peripheral, hwInterface);
|
||||
//var device1 = new Ftms(device.Peripheral, hwInterface);
|
||||
//discoveredDevices.Add(device.Peripheral.Address, device0);
|
||||
|
||||
|
||||
var device1 = new Tacx(device.Peripheral, hwInterface);
|
||||
if (discoveredDevices.ContainsKey(device.Peripheral.Address))
|
||||
{
|
||||
|
||||
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.Scripts.Devices.Ble.Characteristic
|
||||
{
|
||||
@ -56,10 +57,10 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
||||
//throw new NotImplementedException();
|
||||
var responseId = data[2];
|
||||
|
||||
if (responseId != (byte)ANT_Managed_Library.ANT_ReferenceLibrary.ANTMessageID.BROADCAST_DATA_0x4E)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//if (responseId != (byte)ANT_Managed_Library.ANT_ReferenceLibrary.ANTMessageID.BROADCAST_DATA_0x4E)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
var data1 = data.Skip(3).ToArray();
|
||||
var pageNumber = data1[1];
|
||||
switch (pageNumber)
|
||||
|
||||
@ -80,7 +80,7 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
||||
{
|
||||
if (characteristic.MatchGuid(item.Uuid))
|
||||
{
|
||||
//Debug.Log(string.Join(",", response.Data));
|
||||
Debug.Log(string.Join(",", response.Data));
|
||||
item.HandleAttributeReceived(response.Data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,9 +85,9 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
||||
{
|
||||
foreach (var item in base.Characteristics)
|
||||
{
|
||||
if (characteristic.MatchGuid(item.Uuid) || otherGuids.Contains(item.Uuid))
|
||||
if (characteristic.MatchGuid(item.Uuid) || otherGuids.Contains(characteristic.Id))
|
||||
{
|
||||
//Debug.Log(string.Join(",", response.Data));
|
||||
Debug.Log(string.Join(",", response.Data));
|
||||
item.HandleAttributeReceived(response.Data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,6 +37,12 @@ public class MainController : BaseScene
|
||||
//rect1.offsetMax = Vector2.zero;
|
||||
//transform.Find("ModalPanel").GetComponent<RectTransform>().sizeDelta = new Vector2(844, 390);
|
||||
#else
|
||||
var modalRect = transform.Find("ModalPanel").GetComponent<RectTransform>();
|
||||
modalRect.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
modalRect.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
modalRect.offsetMin = Vector2.zero;
|
||||
modalRect.offsetMax = Vector2.zero;
|
||||
modalRect.sizeDelta = new Vector2(1600, 900);
|
||||
App.MainDeviceAdapter.StartScan();
|
||||
#endif
|
||||
|
||||
|
||||
@ -160,6 +160,12 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
uipanel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Panel"), UIObject.transform);
|
||||
uicanvasScaler.referenceResolution = App.PcResolution;
|
||||
loadingcanvasScaler.referenceResolution = App.PcResolution;
|
||||
var modalRect = transform.Find("UI/ModalPanel").GetComponent<RectTransform>();
|
||||
modalRect.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
modalRect.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
modalRect.offsetMin = Vector2.zero;
|
||||
modalRect.offsetMax = Vector2.zero;
|
||||
modalRect.sizeDelta = new Vector2(1600, 900);
|
||||
#endif
|
||||
uipanel.transform.SetAsFirstSibling();
|
||||
uiParent = uipanel.transform;
|
||||
@ -492,9 +498,9 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public void GameStart()
|
||||
{
|
||||
var check = CheckAnt();
|
||||
#if UNITY_EDITOR
|
||||
check = true;
|
||||
#endif
|
||||
//#if UNITY_EDITOR
|
||||
// check = true;
|
||||
//#endif
|
||||
if (check)
|
||||
{
|
||||
singleUIManager.StartRide();
|
||||
@ -506,13 +512,16 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/StartOrPauseButton").GetComponent<Button>().enabled = false;
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/SettingButton").GetComponent<Button>().enabled = false;
|
||||
Utils.showToast(null, "Please connect the device!", duration: int.MaxValue, isLowest: true
|
||||
, stopFunc: () => !(!CheckAnt() && !isWatch)
|
||||
, stopFunc: () => !(!CheckAnt() && !isWatch) || transform.Find("UI/Panel(Clone)/SelectPlayer").gameObject.activeInHierarchy
|
||||
, endCallback: () =>
|
||||
{
|
||||
UIManager.Instance.DevicePanel.Close();
|
||||
singleUIManager.StartRide();
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/StartOrPauseButton").GetComponent<Button>().enabled = true;
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/SettingButton").GetComponent<Button>().enabled = true;
|
||||
if (!transform.Find("UI/Panel(Clone)/SelectPlayer").gameObject.activeInHierarchy)
|
||||
{
|
||||
UIManager.Instance.DevicePanel.Close();
|
||||
singleUIManager.StartRide();
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/StartOrPauseButton").GetComponent<Button>().enabled = true;
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/SettingButton").GetComponent<Button>().enabled = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -506,6 +506,7 @@ namespace Assets.Scripts
|
||||
/*文本框/下拉框错误*/
|
||||
public static void SetValidate(Dictionary<string, Selectable> dict, JArray errorList)
|
||||
{
|
||||
if (errorList == null) return;
|
||||
foreach (var error in errorList)
|
||||
{
|
||||
var className = dict[error.Value<string>("Field")].GetType().Name;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user