From 0a4925bb395baa7dfb5587a265eb2063ad2e10e5 Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Sat, 2 Apr 2022 18:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefab/Device/Mobile/ConnectDeviceModal.prefab | 3 ++- Assets/Scripts/App.cs | 7 +++---- Assets/Scripts/Devices/Ble/Devices/FtmsRower.cs | 14 +++++++------- .../Scripts/UI/Prefab/Device/ConnectDeviceModal.cs | 3 +-- Assets/Scripts/UI/Prefab/Rower/RowerTaskPanel.cs | 6 ++++++ 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Assets/Resources/UI/Prefab/Device/Mobile/ConnectDeviceModal.prefab b/Assets/Resources/UI/Prefab/Device/Mobile/ConnectDeviceModal.prefab index b26dd193..07b44838 100644 --- a/Assets/Resources/UI/Prefab/Device/Mobile/ConnectDeviceModal.prefab +++ b/Assets/Resources/UI/Prefab/Device/Mobile/ConnectDeviceModal.prefab @@ -59,6 +59,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2a0878e6d65232b4eb49c2aa886ab9da, type: 3} m_Name: m_EditorClassIdentifier: + newNav: {fileID: 0} --- !u!1 &2752224541465288006 GameObject: m_ObjectHideFlags: 0 @@ -411,7 +412,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Smart Trainer + m_Text: --- !u!114 &3003252341395391391 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index e036aac9..a407771c 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -222,9 +222,8 @@ public static class App { InitLanguage(); #if !UNITY_EDITOR - //测试服务器 - //Host = "http://pf.juze.pro/"; - Host = "http://192.168.0.101:5083/"; + //测试服务器 Host = "http://192.168.0.101:5083/"; + Host = "http://pf.juze.pro/"; UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000); TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001); //线上 @@ -235,7 +234,7 @@ public static class App //Host = "http://192.168.0.101:5087/"; //UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000); //TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001); - //Debug.unityLogger.logEnabled = false; + Debug.unityLogger.logEnabled = false; #else //Host = "http://pf.juze.pro/"; //Host = "http://192.168.0.101:5087/"; diff --git a/Assets/Scripts/Devices/Ble/Devices/FtmsRower.cs b/Assets/Scripts/Devices/Ble/Devices/FtmsRower.cs index 250e13f1..51dcdff9 100644 --- a/Assets/Scripts/Devices/Ble/Devices/FtmsRower.cs +++ b/Assets/Scripts/Devices/Ble/Devices/FtmsRower.cs @@ -154,13 +154,13 @@ namespace Assets.Scripts.Devices.Ble.Devices { if (C2RowerData.IsEnabled == true) { - //等对csafe协议研究透彻后写 - if (this.c2Control != null) - { - Debug.Log("发送重置命令" + this.c2Control.ToString()); - hwInterface.WriteCharacteristic(this.c2Control, new byte[] { 0xF1, 0x80, 0x80, 0xF2 }); - //hwInterface.WriteCharacteristic(this.c2Control, new byte[] { 0xF1, 0x81, 0x81, 0xF2 }); - } + ////等对csafe协议研究透彻后写 + //if (this.c2Control != null) + //{ + // Debug.Log("发送重置命令" + this.c2Control.ToString()); + // hwInterface.WriteCharacteristic(this.c2Control, new byte[] { 0xF1, 0x80, 0x80, 0xF2 }); + // //hwInterface.WriteCharacteristic(this.c2Control, new byte[] { 0xF1, 0x81, 0x81, 0xF2 }); + //} } else { diff --git a/Assets/Scripts/UI/Prefab/Device/ConnectDeviceModal.cs b/Assets/Scripts/UI/Prefab/Device/ConnectDeviceModal.cs index 79c15f4a..7a040bd3 100644 --- a/Assets/Scripts/UI/Prefab/Device/ConnectDeviceModal.cs +++ b/Assets/Scripts/UI/Prefab/Device/ConnectDeviceModal.cs @@ -22,7 +22,6 @@ public class ConnectDeviceModal : PFUIPanel } set { - //Debug.Log(value); mSensorType = value; var deviceInfoStr = Utils.deviceDict[value.ToString()]; if (deviceInfoStr != null) @@ -30,7 +29,7 @@ public class ConnectDeviceModal : PFUIPanel var deviceInfo = deviceInfoStr.Split('|'); if (deviceInfo.Length == 2) { - Title.text = deviceInfo[0]; + Title.text = App.GetLocalString(deviceInfo[0]); Logo.sprite = Resources.Load(deviceInfo[1]); } } diff --git a/Assets/Scripts/UI/Prefab/Rower/RowerTaskPanel.cs b/Assets/Scripts/UI/Prefab/Rower/RowerTaskPanel.cs index 96d6fab7..34099b6e 100644 --- a/Assets/Scripts/UI/Prefab/Rower/RowerTaskPanel.cs +++ b/Assets/Scripts/UI/Prefab/Rower/RowerTaskPanel.cs @@ -98,6 +98,12 @@ public class RowerTaskPanel : PFUIPanel Utils.showToast(null, "Minimum mileage is 100M.", isOnly: true); return; } + + if (rowerType.type == 2 && rowerType.value < 20) + { + Utils.showToast(null, "Minimum time is 20s.", isOnly: true); + return; + } if (callBack != null) { callBack.Invoke(rowerType);