From 56bbd33ccbc6ddc457bf96b7a6842f9a07aebbe7 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 12 一月 2022 17:02:36 +0800 Subject: [PATCH] 2022-01-12 1.修复计算溢出问题,无法写配置问题 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs | 19 +++++++++++++------ Crabtree/ON.Ios/Info.plist | 4 ++-- Crabtree/ON/Properties/AndroidManifest.xml | 2 +- Crabtree/.vs/SmartHome/xs/UserPrefs.xml | 14 +++++++++++--- Crabtree/ON.Ios/ON.Ios.csproj | 7 ++++--- Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | 2 +- 6 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml index b3073ca..d44858a 100644 --- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml +++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml @@ -2,6 +2,7 @@ <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> <MonoDevelop.Ide.Workbench> <Files> + <File FileName="SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs" Line="155" Column="61" /> <File FileName="ON.Ios/Info.plist" /> </Files> <Pads> @@ -9,6 +10,15 @@ <State name="__root__"> <Node name="SmartHome" expanded="True"> <Node name="ON.Ios" selected="True" /> + <Node name="Shared" expanded="True"> + <Node name="UI" expanded="True"> + <Node name="SimpleControl" expanded="True"> + <Node name="Phone" expanded="True"> + <Node name="Guide" expanded="True" /> + </Node> + </Node> + </Node> + </Node> </Node> </State> </Pad> @@ -24,9 +34,7 @@ <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> <MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> - <BreakpointStore> - <Breakpoint file="/Users/jlchen/Work/Git/CrabtreeOn-OLD/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs" relfile="SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs" line="259" column="1" /> - </BreakpointStore> + <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> </Properties> \ No newline at end of file diff --git a/Crabtree/ON.Ios/Info.plist b/Crabtree/ON.Ios/Info.plist index 817e30a..caf1c5e 100755 --- a/Crabtree/ON.Ios/Info.plist +++ b/Crabtree/ON.Ios/Info.plist @@ -17,9 +17,9 @@ <key>CFBundleIdentifier</key> <string>com.CrabtreeOn</string> <key>CFBundleShortVersionString</key> - <string>2.72201101</string> + <string>2.72201121</string> <key>CFBundleVersion</key> - <string>2.701101</string> + <string>2.701121</string> <key>LSRequiresIPhoneOS</key> <true/> <key>MinimumOSVersion</key> diff --git a/Crabtree/ON.Ios/ON.Ios.csproj b/Crabtree/ON.Ios/ON.Ios.csproj index b352874..f171595 100644 --- a/Crabtree/ON.Ios/ON.Ios.csproj +++ b/Crabtree/ON.Ios/ON.Ios.csproj @@ -18,7 +18,7 @@ <DefineConstants>__IOS__;__MOBILE__;__UNIFIED__;DEBUG;ENABLE_TEST_CLOUD;HDL</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> + <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchDebug>true</MtouchDebug> <MtouchFastDev>true</MtouchFastDev> <MtouchProfiling>false</MtouchProfiling> @@ -30,6 +30,7 @@ <MtouchI18n>cjk</MtouchI18n> <CrashReportingEnabled>false</CrashReportingEnabled> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> + <CodesignProvision>ComHdlOnDevelopment20211224</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> <Optimize>true</Optimize> @@ -77,7 +78,7 @@ <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <DocumentationFile></DocumentationFile> - <CodesignKey>Apple Development: Yogesh Sharma (79Q4G2A772)</CodesignKey> + <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchFastDev>true</MtouchFastDev> <MtouchFastDev>true</MtouchFastDev> <MtouchProfiling>false</MtouchProfiling> @@ -108,7 +109,7 @@ <OnDemandResourcesInitialInstallTags></OnDemandResourcesInitialInstallTags> <OnDemandResourcesPrefetchOrder></OnDemandResourcesPrefetchOrder> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> -<CodesignProvision>CrabtreeOn</CodesignProvision> +<CodesignProvision>ComHdlOnDevelopment20211224</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" /> diff --git a/Crabtree/ON/Properties/AndroidManifest.xml b/Crabtree/ON/Properties/AndroidManifest.xml index 953c0ce..8adc4c2 100644 --- a/Crabtree/ON/Properties/AndroidManifest.xml +++ b/Crabtree/ON/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtree" android:versionCode="202201101" android:versionName="2.701101"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtree" android:versionCode="202201121" android:versionName="2.701121"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="28" /> <!-- 鍦ㄥ畨鍗揚鐗堟湰涔嬪悗锛屽繀椤昏鎺堜簣FOREGROUND_SERVICE鏉冮檺锛屾墠鑳藉浣跨敤鍓嶅彴鏈嶅姟 --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs index 646a28e..30c2c46 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs @@ -39,7 +39,7 @@ //public static Button LogoButton = new Button (); - public static string CodeIDString = "20220110"; + public static string CodeIDString = "20220112"; public static UserInfo LoginUser; diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs index ef9140f..2d454f9 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs @@ -147,12 +147,19 @@ MainPage.Loading.Start ("Configuring device..."); System.Threading.Tasks.Task.Run (() => { try { - var currentRegionIdBytes = new byte [] { - (byte)(UserConfig.Instance.CurrentRegion.RegionID / 256 / 256 / 256), - (byte)(UserConfig.Instance.CurrentRegion.RegionID / 256 / 256), - (byte)(UserConfig.Instance.CurrentRegion.RegionID / 256), - (byte)(UserConfig.Instance.CurrentRegion.RegionID%256), - }; + //2022-01-12 淇璁$畻婧㈠嚭闂 + byte regionID1 = (byte)((UserConfig.Instance.CurrentRegion.RegionID >> (6 * 4)) & 0xFF); + byte regionID2 = (byte)((UserConfig.Instance.CurrentRegion.RegionID >> (4 * 4)) & 0xFF); + byte regionID3 = (byte)((UserConfig.Instance.CurrentRegion.RegionID >> (2 * 4)) & 0xFF); + byte regionID4 = (byte)((UserConfig.Instance.CurrentRegion.RegionID) & 0xFF); + var currentRegionIdBytes = new byte [] {regionID1, regionID2, regionID3, regionID4}; + + //var currentRegionIdBytes = new byte [] { + // (byte)(UserConfig.Instance.CurrentRegion.RegionID / 256 / 256 / 256), + // (byte)(UserConfig.Instance.CurrentRegion.RegionID / 256 / 256), + // (byte)(UserConfig.Instance.CurrentRegion.RegionID / 256), + // (byte)(UserConfig.Instance.CurrentRegion.RegionID%256), + //}; gatewayBytes = Control.ControlBytesSendHasReturn (Command.ReadGateWayModelInfo, gatewayDeicve.SubnetID, gatewayDeicve.DeviceID, new byte [] { }); serverIPBytes = Control.ControlBytesSendHasReturn (Command.ReadGatewayServerIP, gatewayDeicve.SubnetID, gatewayDeicve.DeviceID, new byte [] { }); -- Gitblit v1.8.0