Преглед на файлове

1、从S928获取触控芯片类型,来进行不同系列芯片的处理(BerlinD系列如GT2931还没验证)
2、【数据分析】功能,删除了测试相关的代码,用textGridLayout显示数据,差值和手动差值数据会根据数值大小显示不同深度的红色或蓝色
3、禁用噪声检测和IIC操作功能,点击无响应
4、sensor test,默认的路径改为:system/etc/GT29xx_wingcool.tp,删除最大最小阈值的输入

robbin преди 1 седмица
родител
ревизия
c00b1e7569

+ 2 - 2
app/build.gradle

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

+ 31 - 41
app/src/main/java/com/example/administrator/wingcool_gt9_apk/Config.java

@@ -85,10 +85,13 @@ public class Config extends AppCompatActivity
     private UsbEndpoint mUsbEndpointIn;
     private int iProductId;
     private byte byProductType = 0;
+    private static final byte CHIP_TYPE_UNKNOW = 0;
     private static final byte GT9 = 0x01;
-    private static final byte GT7 = 0x02;
-    private static final byte GT29336 = 0x03;
-    private static final byte GT2931 = 0x04;
+    private static final byte GT9P = 0x02;
+    private static final byte GT738x = 0x03;
+    private static final byte GT29336 = 0x04;  //CHIP_TYPE_BERLINB
+    private static final byte GT989x = 0x05;   //CHIP_TYPE_BERLINA
+    private static final byte GT2931 = 0x06;   //CHIP_TYPE_BERLIND
     private Button mReadCfg;
     private Button mSendCfg;
     private byte[] mBytes = new byte[2048];
@@ -375,6 +378,8 @@ public class Config extends AppCompatActivity
                     //mError.setText("");
                     mReadCfg.setEnabled(true);
                     mSendCfg.setEnabled(true);
+                    iicRead32Bits((byte)0x01, (byte)0x00, (byte)0x14, (byte)47, mBytes, 2);
+                    byProductType = mBytes[1];
                     break;
 
                 case RECEIVER_MESSAGE_SUCCESS://成功接受到数据
@@ -2019,22 +2024,7 @@ public class Config extends AppCompatActivity
                             mUsbDeviceConnection.claimInterface(mUsbInterface, true);
                             if(null != mUsbEndpointIn){
                                 iProductId = usbDevice.getProductId();
-                                /*
-                                if ((iProductId == 0x0819) || (iProductId == 0x8191) || (iProductId == 0x0528) )
-                                {
-                                    byProductType = GT7;
-                                }
-                                else{
-                                    byProductType = GT29336;
-                                }
-                                */
-                                if ((iProductId == 0x0829) || (iProductId == 0x0528) || (iProductId == 0x0928))
-                                {
-                                    byProductType = GT29336;
-                                }
-                                else{
-                                    byProductType = GT2931;
-                                }
+
                                 mHandler.sendEmptyMessage(CONNECTED_SUCCESS);
                             }
 
@@ -2657,7 +2647,7 @@ public class Config extends AppCompatActivity
 
         mCfg8100.setText(mConfigShow[showid++]);
 
-        if (byProductType == GT7) {  //GT7
+        if (byProductType == GT738x) {  //GT7
             mCfg8101.setText(mConfigShow[showid++]);
             mCfg8102.setText(mConfigShow[showid++]);
             mCfg8103.setText(mConfigShow[showid++]);
@@ -3545,7 +3535,7 @@ public class Config extends AppCompatActivity
                 //30ms一次轮询[0x10174],如果是0x80,说明GT29XX已准备好,可以send cfg
                 do {
                     SystemClock.sleep(30);
-                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, mBytes, 1);
+                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, (byte)0x0f, mBytes, 1);
                 }while(mBytes[0] != (byte)0x80);
 
                 //value = configBuilder.toString();
@@ -3632,7 +3622,7 @@ public class Config extends AppCompatActivity
                 //30ms一次轮询[0x10174],如果是0x80,说明GT29XX已接收配置
                 do {
                     SystemClock.sleep(30);
-                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, mBytes, 1);
+                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, (byte)0x0f, mBytes, 1);
                     if (mBytes[0] == (byte)0x03)
                     {
                         stMessageLog = "Config checksum is error!!";
@@ -3662,7 +3652,7 @@ public class Config extends AppCompatActivity
                 //30ms一次轮询[0x10174],如果是0x80,说明GT29XX已完成
                 do {
                     SystemClock.sleep(30);
-                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, mBytes, 1);
+                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, (byte)0x0f, mBytes, 1);
                     if (mBytes[0] == (byte)0x01)
                     {
                         stMessageLog = "receive finish!!";
@@ -3717,7 +3707,7 @@ public class Config extends AppCompatActivity
                 //read [0x10174] = 0x80 or 0x01,表示上条命令已执行完毕,或当前固件处于空闲状态
                 do {
                     SystemClock.sleep(1);
-                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, mBytes, 1);
+                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, (byte)0x0f, mBytes, 1);
                 }while((mBytes[0] != 0x80) && (mBytes[0] != 0x01));
                 */
 
@@ -3734,13 +3724,13 @@ public class Config extends AppCompatActivity
                 //read [0x10175] = 0x80,config is ready
                 //do {
                 //    SystemClock.sleep(30);
-                //    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x75, mBytes, 1);
+                //    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x75, (byte)0x0f, mBytes, 1);
                 //}while(mBytes[0] != (byte)0x80);
 
                 //read [0x10174] = 0x80,config is ready
                 do {
                     SystemClock.sleep(30);
-                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, mBytes, 1);
+                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, (byte)0x0f, mBytes, 1);
                 }while(mBytes[0] != (byte)0x80);
 
                 //SystemClock.sleep(2);
@@ -3756,11 +3746,11 @@ public class Config extends AppCompatActivity
                 }
 
                 //read buffer [0x13B74]/[0X1218C]
-                iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, mBytes, 63);  //read config head
+                iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, (byte)0x0f, mBytes, 63);  //read config head
 
                 int iConfigSize = 64 + (int)(mBytes[60] & 0xFF) * 256 + (mBytes[59] & 0xFF);   //the head lend is 64
 
-                iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, mBytes, iConfigSize);  //read config
+                iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, (byte)0x0f, mBytes, iConfigSize);  //read config
 
                 for (int i = 0; i < iConfigSize; i++) {
 
@@ -3799,7 +3789,7 @@ public class Config extends AppCompatActivity
                 //read [0x10175] = 0x80,read config is over
                 do {
                     SystemClock.sleep(30);
-                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, mBytes, 1);
+                    iicRead32Bits((byte)0x01, (byte)0x01, (byte)0x74, (byte)0x0f, mBytes, 1);
                 }while(mBytes[0] != (byte)0x80);
 
                 //SystemClock.sleep(2);
@@ -3808,7 +3798,7 @@ public class Config extends AppCompatActivity
                 stMessageLogShow = stMessageLogShow.concat(stMessageLog);
                 mShow.setText(stMessageLogShow);
 
-                iicRead32Bits((byte)0x01, (byte)0x00, (byte)0x2B, mBytes, 4);  //read Sensor ID
+                iicRead32Bits((byte)0x01, (byte)0x00, (byte)0x2B, (byte)0x0f, mBytes, 4);  //read Sensor ID
                 tvVenderID.setText("VenderID:"+Integer.toString(mBytes[0] & 0xFF));
 
                 /*
@@ -4090,12 +4080,12 @@ public class Config extends AppCompatActivity
         return true;
     }
 
-    //发送命令,使得S8xx可以通过IIC向GT79xx的固定地址读取任意bytes的数据
-    private boolean iicRead32Bits(byte addrfirstbyte,byte addrsecondbyte,byte addrthirdbyte,byte[] wBuffer,int length) {
+    //发送命令,使得S8xx可以通过IIC向GT29xx的固定地址读取任意bytes的数据
+    private boolean iicRead32Bits(byte addrfirstbyte,byte addrsecondbyte,byte addrthirdbyte,byte subCommand,byte[] wBuffer,int length) {
 
         int i;
 
-        iicByteData[1] = 0x0f; //7bit:0-read,1-write;other:command
+        iicByteData[1] = (byte)(0 | subCommand);//0x0f; //7bit:0-read,1-write;other:command
         //iicByteData[2] = 0x0f; //no command
         iicByteData[2] = addrfirstbyte;
         iicByteData[3] = addrsecondbyte;
@@ -4111,7 +4101,7 @@ public class Config extends AppCompatActivity
         int address2 = addrthirdbyte & 0xff;
         int address = address1 | address2;
 
-        int sendTimes = length/63;  //预计是向下取整,所以+1
+        int sendTimes = length / 63;  //预计是向下取整,所以+1
 
         if ((length % 63) != 0)
         {
@@ -4125,14 +4115,14 @@ public class Config extends AppCompatActivity
             int finalOffset = k*63; //每次只能发57bytes数据
             int offset = k * 64;
 
-              if(length - (finalOffset ) < 63) {
+            if(length - (finalOffset ) < 63) {
 
-             iicByteData[6] = (byte) (length - (finalOffset));  //length
+                iicByteData[6] = (byte) (length - (finalOffset));  //length
+            }
+            else
+            {
+                iicByteData[6] = 63;
             }
-               else
-              {
-              iicByteData[6] = 63;
-              }
 
             //发送读取命令
             i = mUsbDeviceConnection.bulkTransfer(mUsbEndpointOut, iicByteData, 0, 0x40, 100);
@@ -4307,7 +4297,7 @@ public class Config extends AppCompatActivity
 
         //if(false)
         {
-            if (!iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, pbBuf, length))
+            if (!iicRead32Bits(addrfirstbyte, addrsecondbyte, addrthirdbyte, (byte)0x0f, pbBuf, length))
             //if (!iicRead(addressHigh, addressLow, pbBuf, length))
             {
                 //FwUpdateMessage(L"recall i2c error failed", MSG_ERR);

Файловите разлики са ограничени, защото са твърде много
+ 125 - 645
app/src/main/java/com/example/administrator/wingcool_gt9_apk/DataAnalysis.java


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

@@ -107,10 +107,13 @@ public class FirmwareUpdate extends AppCompatActivity
     private TextView tvUpDataResult;
     private int iProductId;
     private byte byProductType = 0;
+    private static final byte CHIP_TYPE_UNKNOW = 0;
     private static final byte GT9 = 0x01;
-    private static final byte GT7 = 0x02;
-    private static final byte GT29336 = 0x03;
-    private static final byte GT2931 = 0x04;
+    private static final byte GT9P = 0x02;
+    private static final byte GT738x = 0x03;
+    private static final byte GT29336 = 0x04;  //CHIP_TYPE_BERLINB
+    private static final byte GT989x = 0x05;   //CHIP_TYPE_BERLINA
+    private static final byte GT2931 = 0x06;   //CHIP_TYPE_BERLIND
     
     int FW_HEAD_LENGTH	=		14;
     int FW_SECTION_LENGTH	=	0x2000; 	/** 8K */
@@ -189,6 +192,8 @@ public class FirmwareUpdate extends AppCompatActivity
             switch (msg.what) {
                 case CONNECTED_SUCCESS://车机和手机连接成功
                     btnReadVersion.setEnabled(true);
+                    iicRead32Bits((byte)0x01, (byte)0x00, (byte)0x14, (byte)47, mBytes, 2);
+                    byProductType = mBytes[1];
                     //btn_update.setEnabled(true);
                     //btn_AutoUpdate.setEnabled(true);
                     //loopReceiverMessage();
@@ -507,20 +512,7 @@ public class FirmwareUpdate extends AppCompatActivity
                             mUsbDeviceConnection.claimInterface(mUsbInterface, true);
                             if(null != mUsbEndpointIn){
                                 iProductId = usbDevice.getProductId();
-                                //if ((iProductId == 0x0819) || (iProductId == 0x8191)||(iProductId == 0x0528))
-                                //{
-                                //    byProductType = GT7;
-                                //}else{
-                                //    byProductType = GT9;
-                                //}
-
-                                if ((iProductId == 0x0829) || (iProductId == 0x0528) || (iProductId == 0x0928))
-                                {
-                                    byProductType = GT29336;
-                                }
-                                else{
-                                    byProductType = GT2931;
-                                }
+
                                 mHandler.sendEmptyMessage(CONNECTED_SUCCESS);
                             }
                         }

+ 2 - 2
app/src/main/java/com/example/administrator/wingcool_gt9_apk/GT9MainActivity.java

@@ -340,7 +340,7 @@ public class GT9MainActivity extends AppCompatActivity
         //EditText editText = (EditText) findViewById(R.id.editText);
         //String message = editText.getText().toString();
         //intent.putExtra(EXTRA_MESSAGE, message);
-        startActivity(intent);
+        //startActivity(intent);
     }
 
     /** Called when the user taps the Demo Tools button */
@@ -358,7 +358,7 @@ public class GT9MainActivity extends AppCompatActivity
         //EditText editText = (EditText) findViewById(R.id.editText);
         //String message = editText.getText().toString();
         //intent.putExtra(EXTRA_MESSAGE, message);
-        startActivity(intent);
+        //startActivity(intent);
     }
 
     /** Called when the user taps the Contact Us button */

+ 24 - 69
app/src/main/java/com/example/administrator/wingcool_gt9_apk/SensorTest.java

@@ -87,16 +87,14 @@ public class SensorTest extends AppCompatActivity
     private byte[] byGt293xFirmwareDataArray = new byte[300 * 1024];  //Fw存放的数组
     private byte[] byGt293xConfigDataArray = new byte[2 * 1024];     //Cfg存放的数组
     private static final int RAWDATA_MESSAGE = 0;
-    private static final int LOG1_MESSAG = 1;
-    private static final int CLEAR_MESSAGE= 2;
-    private static final int LOG2_MESSAGE = 3;
-    private static final int CONNECTED_SUCCESS = 4;
-    private static final int DIFF_MESSAGE = 5;
-    private static final int MANUALDIFF_MESSAGE = 6;
-    private static final int TEST_DATA_MESSAGE = 7;
-    private static final int OTHER_DATA_MESSAGE = 8;
-    private static final int UPDATE_FW_MESSAGE = 9;
-    private static final int UPDATE_CFG_MESSAGE = 10;
+    private static final int CLEAR_MESSAGE= 1;
+    private static final int CONNECTED_SUCCESS = 2;
+    private static final int DIFF_MESSAGE = 3;
+    private static final int MANUALDIFF_MESSAGE = 4;
+    private static final int TEST_DATA_MESSAGE = 5;
+    private static final int OTHER_DATA_MESSAGE = 6;
+    private static final int UPDATE_FW_MESSAGE = 7;
+    private static final int UPDATE_CFG_MESSAGE = 8;
 
     private static final int PERMISSION_REQUEST_CODE = 3;
 
@@ -112,10 +110,13 @@ public class SensorTest extends AppCompatActivity
     private UsbEndpoint mUsbEndpointIn;
     private int iProductId;
     private byte byProductType = 0;
+    private static final byte CHIP_TYPE_UNKNOW = 0;
     private static final byte GT9 = 0x01;
-    private static final byte GT7 = 0x02;
-    private static final byte GT29336 = 0x03;
-    private static final byte GT2931 = 0x04;
+    private static final byte GT9P = 0x02;
+    private static final byte GT738x = 0x03;
+    private static final byte GT29336 = 0x04;  //CHIP_TYPE_BERLINB
+    private static final byte GT989x = 0x05;   //CHIP_TYPE_BERLINA
+    private static final byte GT2931 = 0x06;   //CHIP_TYPE_BERLIND
 
     private Button btn_ImportFileButton;
     private Button btn_Test;
@@ -125,8 +126,6 @@ public class SensorTest extends AppCompatActivity
 
     private EditText edt_RowNum;
     private EditText edt_ColNum;
-    private EditText edt_Maximum;
-    private EditText edt_Minimum;
     private EditText edt_TestiInformation;     //显示最大最小值测试过程信息
     private EditText edtShortCircuitInfo;      //the info of short circuit test
     private EditText edtUpdateCfgInformation;  //显示升级cfg过程信息
@@ -152,10 +151,6 @@ public class SensorTest extends AppCompatActivity
     private byte showAddressLow;  //需要显示的 address
     private int colnum;
     private int rownum;
-    private int iMaximum;  //存放外部输入的最大值测试阈值
-    private int iMinimum;  //存放外部输入的最小值测试阈值
-    private byte byMaximumOverCount;  //最大值超过阈值的次数
-    private byte byMinimumOverCount;  //最小值超过阈值的次数
     private byte byTestCount;  //统计测试的帧数
     private byte byReTestCount;  //重新测试的测试,最多测试4次输出判定结果
     private boolean bTestMaxResult,bTestMinResult;  //测试结果pass或者fail;
@@ -163,7 +158,6 @@ public class SensorTest extends AppCompatActivity
     private TextView tvMinimum;      //显示最小值
     private TextView tvDataContent;  //显示当前处于何种数值模式:原始值、差值、基准……
     private TextView tvMAD;          //显示最大相邻偏差
-    private TextView mtextView;
     private TextView edit_search;
     private byte byDisplayFrame = 0;   //间隔显示帧数
     private byte byDisplayFrameCount = 0;   //用于间隔显示计数
@@ -715,8 +709,6 @@ public class SensorTest extends AppCompatActivity
     private void InitEditText(){
         edt_RowNum = (EditText) findViewById(R.id.inputrownum);
         edt_ColNum = (EditText) findViewById(R.id.inputcolnum);
-        edt_Maximum = (EditText) findViewById(R.id.inputmaximum);
-        edt_Minimum = (EditText) findViewById(R.id.inputminimum);
         edt_TestiInformation = (EditText) findViewById(R.id.maxandmintestinfo);  //显示测试过程信息
         edt_TestiInformation.setKeyListener(null);
 
@@ -1167,17 +1159,7 @@ public class SensorTest extends AppCompatActivity
                             mUsbDeviceConnection.claimInterface(mUsbInterface, true);
                             if(null != mUsbEndpointIn){
                                 iProductId = usbDevice.getProductId();
-                                //if ((iProductId == 0x0819) || (iProductId == 0x8191) || (iProductId == 0x0528))
-                                //{
-                                //    byProductType = GT7;
-                                //}
-                                if ((iProductId == 0x0829) || (iProductId == 0x0528) || (iProductId == 0x0928))
-                                {
-                                    byProductType = GT29336;
-                                }
-                                else{
-                                    byProductType = GT2931;
-                                }
+
                                 mHandler.sendEmptyMessage(CONNECTED_SUCCESS);
                             }
                         }
@@ -1801,9 +1783,10 @@ public class SensorTest extends AppCompatActivity
     @RequiresApi(api = Build.VERSION_CODES.KITKAT)
     private void readFile() {
         // 获取外部存储目录
-        File externalStorageDirectory = Environment.getExternalStorageDirectory();
+        //File externalStorageDirectory = Environment.getExternalStorageDirectory();
+        String filePath = "system/etc/GT29xx_wingcool.tp";
         // 构建文件路径
-        File file = new File(externalStorageDirectory, "GT29xx_wingcool.tp");
+        File file = new File(filePath);
         String holetppocketdatastring = "";
         StringBuilder stringBuilder = new StringBuilder();
         try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
@@ -1812,7 +1795,7 @@ public class SensorTest extends AppCompatActivity
                 stringBuilder.append(line).append("\n");
             }
             // 将文件内容显示在 TextView 中
-            edit_search.setText(externalStorageDirectory.toString() + "/GT29xx_wingcool.tp");
+            edit_search.setText(file.getAbsolutePath());
 
             int i,j,k,l= 0;
 
@@ -1930,7 +1913,7 @@ public class SensorTest extends AppCompatActivity
                     bin_index = bin_index + strtemp.length() + 8;
 
                     //如果有选择Fw,先存储出来,用于后续升级
-                    FileInputStream fw = new FileInputStream(externalStorageDirectory.toString() + "/GT29xx_wingcool.tp");
+                    FileInputStream fw = new FileInputStream(file.getAbsolutePath());
                     fw.read(byGt293xFirmwareDataArray);
                     fw.close();
 
@@ -2026,7 +2009,6 @@ public class SensorTest extends AppCompatActivity
     }
 
     public void initTextView() {
-        //mtextView = (TextView) findViewById(R.id.textView);
         tvMaximum = (TextView) findViewById(R.id.maximumshow);
         tvMinimum = (TextView) findViewById(R.id.minimumshow);
         tvDataContent = (TextView) findViewById(R.id.datacontentshow);
@@ -2057,7 +2039,7 @@ public class SensorTest extends AppCompatActivity
                 byte addrsecondbyte = (byte)0x01;
                 byte addrthirdbyte = (byte)0x74;
 
-                if (byProductType == GT7) {
+                if (byProductType == GT738x) {
                     maddressHigh = (byte) 0x82;
                 }
 
@@ -2490,7 +2472,7 @@ public class SensorTest extends AppCompatActivity
                                 case MANUALDATA_FLAG://manual diff
                                     if (count == 999)   //第一帧备份rawdata作为基准
                                     {
-                                        if (byProductType == GT7) {
+                                        if (byProductType == GT738x) {
                                             for (int i = 0; i < 44 * 72; i++) {
                                                 //int j = i / 2;
                                                 mManualRefInt[i] = iDataShow[i];//((mRawdataBytes[i + 1] & 0xFF) << 8) + (mRawdataBytes[i] & 0xFF);
@@ -2685,11 +2667,12 @@ public class SensorTest extends AppCompatActivity
                     break;
 
                 case CLEAR_MESSAGE://清除数据
-                    mtextView.setText("");
                     break;
 
                 case CONNECTED_SUCCESS: //连接成功
                     btn_Test.setEnabled(true);
+                    iicRead32Bits((byte)0x01, (byte)0x00, (byte)0x14, (byte)47, mBytes, 2);
+                    byProductType = mBytes[1];
                     break;
 
                 case DIFF_MESSAGE://
@@ -2756,23 +2739,6 @@ public class SensorTest extends AppCompatActivity
                             }
                         }
                         rawdata_temp_string += "\n";
-                        /*
-                        if (maxdata > iMaximum)  //统计最大值大于阈值的次数
-                        {
-                            byMaximumOverCount++;
-                        }
-
-                        if (mindata < iMinimum)  //统计最小值小于阈值的次数
-                        {
-                            byMinimumOverCount++;
-                        }
-                        */
-
-                        //if (maxdata > mindata * 2)  //统计最大值大于阈值的次数
-                        //{
-                        //    byMaximumOverCount++;
-                        //}
-
 
                         //if (byTestCount > 3)
                         {
@@ -2859,15 +2825,6 @@ public class SensorTest extends AppCompatActivity
                             stTestLog = getResources().getString(R.string.maxmintestfinish);
                             stTestLogShow = stTestLogShow.concat(stTestLog);
 
-                        /*
-                            stTestLog = "最大值超过阈值的次数:" + Integer.toString(byMaximumOverCount);
-                            stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
-
-                            stTestLog = "最小值超过阈值的次数:" + Integer.toString(byMinimumOverCount);
-                            stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
-                        */
                             if (bTestMaxResult == false || bTestMinResult == false) {
 
                                 stTestLog = getResources().getString(R.string.maxoutrange);
@@ -4996,8 +4953,6 @@ public class SensorTest extends AppCompatActivity
 
                 showFlag = TESTING_FLAG;
                 byTestCount = 0;
-                byMaximumOverCount = 0;
-                byMinimumOverCount = 0;
                 byReTestCount = 0;
 
                 strSaveRawDataMaxArray = "";

+ 7 - 8
app/src/main/java/com/example/administrator/wingcool_gt9_apk/UsbSetting.java

@@ -85,8 +85,13 @@ public class UsbSetting extends AppCompatActivity
     private UsbEndpoint mUsbEndpointIn;
     private int iProductId;
     private byte byProductType = 0;
+    private static final byte CHIP_TYPE_UNKNOW = 0;
     private static final byte GT9 = 0x01;
-    private static final byte GT7 = 0x02;
+    private static final byte GT9P = 0x02;
+    private static final byte GT738x = 0x03;
+    private static final byte GT29336 = 0x04;  //CHIP_TYPE_BERLINB
+    private static final byte GT989x = 0x05;   //CHIP_TYPE_BERLINA
+    private static final byte GT2931 = 0x06;   //CHIP_TYPE_BERLIND
     private Button mReadCfg;
     private Button mSendCfg;
     private byte[] mBytes = new byte[1024];
@@ -437,13 +442,7 @@ public class UsbSetting extends AppCompatActivity
                             mUsbDeviceConnection.claimInterface(mUsbInterface, true);
                             if(null != mUsbEndpointIn){
                                 iProductId = usbDevice.getProductId();
-                                if ((iProductId == 0x0819) || (iProductId == 0x8191) || (iProductId == 0x0528) || (iProductId == 0x0928) )
-                                {
-                                    byProductType = GT7;
-                                }
-                                else{
-                                    byProductType = GT9;
-                                }
+
                                 mHandler.sendEmptyMessage(CONNECTED_SUCCESS);
                             }
 

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

@@ -119,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.0E_20250409-Debug Version</string>
+    <string name="version">APK Version:v3.0.10_20250512-Debug Version</string>
 
     <!-- other -->
     <string name="app_name">WingCoolAPK</string>

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

@@ -119,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.0E_20250409-debug版本</string>
+    <string name="version">APK版本:v3.0.10_20250512-debug版本</string>
 
     <!-- other -->
     <string name="app_name">WingCoolAPK</string>

Някои файлове не бяха показани, защото твърде много файлове са промени