Pārlūkot izejas kodu

1、【固件下载】项里面,读取配置版本号改用10进制显示
2、在.tp文件中找cfg数据时,先找文件后缀为.cfg的字段,如果没找到就去找.CFG字段,有些配置文件的后缀名存成了大写字母
3、存fw数据的时候,用打开文件的形式获取数据,然后转换成Bytes数组
4、调整测试项的判断以及打印顺序
5、删除一些不用的代码

robbin 3 nedēļas atpakaļ
vecāks
revīzija
fb5f9f87b6

+ 1 - 1
app/build.gradle

@@ -14,7 +14,7 @@ android {
         variant ->
             variant.outputs.all{
                 //此处指定生成的apk文件名
-                outputFileName = "WingCoolAPK_V3.0.0C_20250226_debug.apk"
+                outputFileName = "WingCoolAPK_V3.0.0C_20250331_debug.apk"
             }
     }
     lintOptions {

+ 1 - 8
app/src/main/java/com/example/administrator/wingcool_gt9_apk/FirmwareUpdate.java

@@ -664,14 +664,7 @@ public class FirmwareUpdate extends AppCompatActivity
                     //read buffer [0x13B74]/[0X1218C]
                     iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, (byte)0x0f, mBytes, 63);  //read config head
 
-                    int k = mBytes[34] & 0xFF;
-
-                    hv = Integer.toHexString(k);
-                    if (hv.length() < 2){
-                        hv = "0" + hv;
-                    }
-
-                    strpidversion = "Config Version:0x" + hv;
+                    strpidversion = "Config Version: " + Integer.toString(mBytes[34]);
 
                     SystemClock.sleep(5);
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 380 - 626
app/src/main/java/com/example/administrator/wingcool_gt9_apk/SensorTest.java


+ 8 - 1
app/src/main/res/values-en/strings.xml

@@ -71,6 +71,13 @@
     <string name="importtestpara">Import Test File</string>
     <string name="test">Test</string>
     <string name="stop">Stop</string>
+    <string name="noneedtoupdatecfg">[Cfg update]The Cfg used by chip is the same as that in the file\n[Cfg update]No need to update Cfg\n</string>
+    <string name="needtoupdatecfg">[Cfg update]The Cfg used by chip is inconsistent with that in the file\n[Cfg update]Need to update Cfg\n</string>
+    <string name="enforceupdatecfg">[Cfg update]Enforce the update of Cfg file...\n</string>
+    <string name="noneedtoupdatefw">[Fw update]The Fw running on chip is the same as that in the file\n[Fw update]No need to update Fw\n</string>
+    <string name="needtoupdatefw">[Fw update]The Fw running on chip is inconsistent with that in the file\n[Fw update]Need to update Fw\n</string>
+    <string name="enforceupdatefw">[Fw update]Enforce the update of Fw file...\n</string>
+    <string name="updatefwsuccess">[FW update]Update Fw Finish!!\n</string>
     <string name="cfgerror">Read cfg fail,please manually enter the Sen and Drv numbers</string>
     <string name="thresholdlimit">The minimum threshold cannot be greater than or less than 1/2 of the maximum threshold</string>
     <string name="startmaxmintest">Start test,</string>
@@ -112,7 +119,7 @@
     <string name="companyaddr">Address:Room 2006, Chuangxingda Business Building, No.36 Liuxian 3rd Road, Baoan District, Shenzhen</string>
     <string name="telephonenum">Telephone:186 8896 1937</string>
     <string name="emailaddr">Email:robbin@wingcool.cn</string>
-    <string name="version">APK Version:v3.0.0C_20250324-Debug Version</string>
+    <string name="version">APK Version:v3.0.0C_20250331-Debug Version</string>
 
     <!-- other -->
     <string name="app_name">WingCoolAPK</string>

+ 8 - 1
app/src/main/res/values/strings.xml

@@ -71,6 +71,13 @@
     <string name="importtestpara">导入测试文件</string>
     <string name="test">测 试</string>
     <string name="stop">停 止</string>
+    <string name="noneedtoupdatecfg">[Cfg update]配置信息相同,不需要更新\n</string>
+    <string name="needtoupdatecfg">[Cfg update]配置信息不相同,需要更新\n</string>
+    <string name="enforceupdatecfg">[Cfg update]强制更新配置信息……\n</string>
+    <string name="noneedtoupdatefw">[Fw update]Fw版本相同,不需要更新\n</string>
+    <string name="needtoupdatefw">[Fw update]Fw版本不相同,需要更新\n</string>
+    <string name="enforceupdatefw">[Fw update]强制更新Fw……\n</string>
+    <string name="updatefwfinish">[Fw update]更新Fw完成!!\n</string>
     <string name="cfgerror">Cfg读取错误,请手动输入要显示的行列数</string>
     <string name="thresholdlimit">最小值阈值不能大于最大值阈值,或小于最大值阈值的1/2</string>
     <string name="startmaxmintest">开始进行测试,</string>
@@ -112,7 +119,7 @@
     <string name="companyaddr">地址:深圳市宝安区留仙三路 36 号创兴达商务大厦 2006 室</string>
     <string name="telephonenum">电话:186 8896 1937</string>
     <string name="emailaddr">邮箱:robbin@wingcool.cn</string>
-    <string name="version">APK版本:v3.0.0C_20250324-debug版本</string>
+    <string name="version">APK版本:v3.0.0C_20250331-debug版本</string>
 
     <!-- other -->
     <string name="app_name">WingCoolAPK</string>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels