JLChen
2022-01-12 56bbd33ccbc6ddc457bf96b7a6842f9a07aebbe7
2022-01-12 1.修复计算溢出问题,无法写配置问题
6个文件已修改
48 ■■■■■ 已修改文件
Crabtree/.vs/SmartHome/xs/UserPrefs.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Crabtree/ON.Ios/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Crabtree/ON.Ios/ON.Ios.csproj 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Crabtree/ON/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Crabtree/SmartHome/UI/SimpleControl/MainPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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>
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" />
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" />
    <!-- 在安卓P版本之后,必须要授予FOREGROUND_SERVICE权限,才能够使用前台服务 -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
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;
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 [] { });