Jelajahi Sumber

1、下载固件选择文件时,放开文件类型限制,避免一些安卓版本类型不对
2、sensor测试前,增加对.tp文件里的选择判断,判断做哪些测试,是否升级cfg、fw等,并将对应的选择和升级log存储(目前版本在升级过程中的Log显示有问题,还需要修改)

robbin 4 minggu lalu
induk
melakukan
1453eff969

+ 2 - 2
app/build.gradle

@@ -7,14 +7,14 @@ android {
         minSdkVersion 18
         targetSdkVersion 28
         versionCode 1
-        versionName "3.0.B"
+        versionName "3.0.0C"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
     android.applicationVariants.all {
         variant ->
             variant.outputs.all{
                 //此处指定生成的apk文件名
-                outputFileName = "WingCoolAPK_V3.0.B_20250226_debug.apk"
+                outputFileName = "WingCoolAPK_V3.0.0C_20250226_debug.apk"
             }
     }
     lintOptions {

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

@@ -348,7 +348,7 @@ public class FirmwareUpdate extends AppCompatActivity
             @Override
             public void onClick(View v) {
                 Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
-                intent.setType("application/octet-stream");//设置类型
+                intent.setType("*/*");//设置类型
                 intent.addCategory(Intent.CATEGORY_OPENABLE);
                 startActivityForResult(intent, 1);
             }

File diff ditekan karena terlalu besar
+ 496 - 140
app/src/main/java/com/example/administrator/wingcool_gt9_apk/SensorTest.java


+ 33 - 0
app/src/main/res/layout-hdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-land-hdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-land-mdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-land-xhdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-land-xxhdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-land-xxxhdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-land/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-mdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-xhdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-xxhdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout-xxxhdpi/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

+ 33 - 0
app/src/main/res/layout/activity_sensor_test.xml

@@ -287,6 +287,39 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/UpdateInfoLinearLayout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginBottom="8dp"
+                android:layout_marginEnd="8dp"
+                android:orientation="horizontal"
+                tools:context=".SensorTest">
+
+                <EditText
+                    android:id="@+id/updatefwinfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+                <EditText
+                    android:id="@+id/updatecfginfo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
+                    android:text=""
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/TestInfoLinearLayout"
                 android:layout_width="match_parent"

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

@@ -83,6 +83,8 @@
     <string name="minisrisk">Minimum value is in the critical range, there is a risk!</string>
     <string name="testpass">Test pass!</string>
     <string name="testng">Test is NG!</string>
+    <string name="noshorttest">Since the short-circuit test has not been selected, it will not be carried out.</string>
+    <string name="nomaxminvaluetest">Since the max/min value test has not been selected, it will not be carried out.</string>
     <string name="startshorttest">Start short-circuit test, Please wait until finishes...\n</string>
     <string name="shorttestfinish">Short circuit test is finished!</string>
     <string name="shorttestng">Short circuit test is NG!</string>
@@ -110,7 +112,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.B_20250226-Debug Version</string>
+    <string name="version">APK Version:v3.0.0C_20250324-Debug Version</string>
 
     <!-- other -->
     <string name="app_name">WingCoolAPK</string>

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

@@ -83,6 +83,8 @@
     <string name="minisrisk">最小值在临界范围,存在风险!</string>
     <string name="testpass">测试通过!</string>
     <string name="testng">测试NG!</string>
+    <string name="noshorttest">没有选择短路测试,不进行测试</string>
+    <string name="nomaxminvaluetest">没有选择最大最小值测试,不进行测试</string>
     <string name="startshorttest">开始进行短路测试,请等待测试完成……\n</string>
     <string name="shorttestfinish">短路测试完成!</string>
     <string name="shorttestng">短路测试NG!</string>
@@ -110,7 +112,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.B_20250226-debug版本</string>
+    <string name="version">APK版本:v3.0.0C_20250324-debug版本</string>
 
     <!-- other -->
     <string name="app_name">WingCoolAPK</string>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini