Jelajahi Sumber

1、将中文提取出来,以便中英文切换;2、删除多余的代码;3、优化测试信息显示;
todolist:
1、界面优化;2、配置界面有些配置信息不显示,要再读取一次;3、优化数据显示。

robbin 3 tahun lalu
induk
melakukan
1538517332
33 mengubah file dengan 522 tambahan dan 951 penghapusan
  1. 7 7
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/Config.java
  2. 124 240
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/DataAnalysis.java
  3. 0 3
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/FirmwareUpdate.java
  4. 15 16
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/GT9MainActivity.java
  5. 2 2
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/IICOperation.java
  6. 7 44
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/NoiseAnalysis.java
  7. 13 48
      app/src/main/res/layout-hdpi/activity_dataanalysis.xml
  8. 2 2
      app/src/main/res/layout-hdpi/view_module_switch.xml
  9. 13 48
      app/src/main/res/layout-land-hdpi/activity_dataanalysis.xml
  10. 2 2
      app/src/main/res/layout-land-hdpi/view_module_switch.xml
  11. 13 48
      app/src/main/res/layout-land-mdpi/activity_dataanalysis.xml
  12. 2 2
      app/src/main/res/layout-land-mdpi/view_module_switch.xml
  13. 13 48
      app/src/main/res/layout-land-xhdpi/activity_dataanalysis.xml
  14. 2 2
      app/src/main/res/layout-land-xhdpi/view_module_switch.xml
  15. 13 48
      app/src/main/res/layout-land-xxhdpi/activity_dataanalysis.xml
  16. 2 2
      app/src/main/res/layout-land-xxhdpi/view_module_switch.xml
  17. 13 48
      app/src/main/res/layout-land-xxxhdpi/activity_dataanalysis.xml
  18. 2 2
      app/src/main/res/layout-land-xxxhdpi/view_module_switch.xml
  19. 13 48
      app/src/main/res/layout-land/activity_dataanalysis.xml
  20. 2 2
      app/src/main/res/layout-land/view_module_switch.xml
  21. 13 48
      app/src/main/res/layout-mdpi/activity_dataanalysis.xml
  22. 2 2
      app/src/main/res/layout-mdpi/view_module_switch.xml
  23. 13 48
      app/src/main/res/layout-xhdpi/activity_dataanalysis.xml
  24. 2 2
      app/src/main/res/layout-xhdpi/view_module_switch.xml
  25. 13 48
      app/src/main/res/layout-xxhdpi/activity_dataanalysis.xml
  26. 2 2
      app/src/main/res/layout-xxhdpi/view_module_switch.xml
  27. 13 48
      app/src/main/res/layout-xxxhdpi/activity_dataanalysis.xml
  28. 2 2
      app/src/main/res/layout-xxxhdpi/view_module_switch.xml
  29. 13 48
      app/src/main/res/layout/activity_dataanalysis.xml
  30. 2 2
      app/src/main/res/layout/view_module_switch.xml
  31. 117 0
      app/src/main/res/values-en/spinnerlist.xml
  32. 36 21
      app/src/main/res/values-en/strings.xml
  33. 34 18
      app/src/main/res/values/strings.xml

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

@@ -64,8 +64,8 @@ import java.util.concurrent.Executors;
  */
 
 public class Config extends AppCompatActivity
-        implements OpenDevicesReceiver.OpenDevicesListener, View.OnClickListener , ViewPager.OnPageChangeListener, AdapterView.OnItemSelectedListener{
-
+        //implements OpenDevicesReceiver.OpenDevicesListener, View.OnClickListener , ViewPager.OnPageChangeListener, AdapterView.OnItemSelectedListener{
+        implements OpenDevicesReceiver.OpenDevicesListener, View.OnClickListener , ViewPager.OnPageChangeListener{
     private static final int CONNECTED_SUCCESS = 0;
     private static final int RECEIVER_MESSAGE_SUCCESS = 1;
     private static final int SEND_MESSAGE_SUCCESS = 2;
@@ -122,7 +122,7 @@ public class Config extends AppCompatActivity
     private Spinner spinPGAC,spinPGAR,spinRxVcmi,spinPGAGain;
     private Spinner spinBoostTime,spinVoltage,spinAlterCount;
     private CheckBox cbExtoscen;
-    private boolean PGAGainSelected = false;  //判断是否为刚进去时触发onItemSelected的标志
+    //private boolean PGAGainSelected = false;  //判断是否为刚进去时触发onItemSelected的标志
     private TextWatcher twBitFreq,twDuration,twFreqAFactor,twFreqBFactor,twFreqA,twFreqB;
 
     //View Module Switch 定义
@@ -851,7 +851,7 @@ public class Config extends AppCompatActivity
         spinPGAR = viewsample.findViewById(R.id.pgar);
         spinRxVcmi = viewsample.findViewById(R.id.rxvcmi);
         spinPGAGain = viewsample.findViewById(R.id.pgagainspin);
-        spinPGAGain.setOnItemSelectedListener(this);
+        //spinPGAGain.setOnItemSelectedListener(this);
         spinBoostTime = viewsample.findViewById(R.id.boosttime);
         spinVoltage = viewsample.findViewById(R.id.voltage);
         spinAlterCount = viewsample.findViewById(R.id.altercount);
@@ -1277,7 +1277,7 @@ public class Config extends AppCompatActivity
         mCfg8100 = viewcfgram.findViewById(R.id.cfg8100);
     }
     //===============================各view中的元素初始化结束===============================================//
-
+/*
     @Override
     public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
         switch (parent.getId()){
@@ -1297,7 +1297,7 @@ public class Config extends AppCompatActivity
     public void onNothingSelected(AdapterView<?> parent) {
 
     }
-
+*/
     public List<String> loadFile(String fileName){
         List<String> lists = new ArrayList<>();
         try {
@@ -3399,7 +3399,7 @@ public class Config extends AppCompatActivity
             case R.id.savecfg:
 
                 if (editname.getText().length() == 0){
-                    Toast.makeText(this,"请输入文件名及文件格式",Toast.LENGTH_SHORT).show();
+                    Toast.makeText(this, getResources().getString(R.string.nameandformat), Toast.LENGTH_SHORT).show();
                 }else{
                     ActivityCompat.requestPermissions(  Config.this, new String[]{android
                             .Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);

+ 124 - 240
app/src/main/java/com/example/administrator/wingcool_gt9_apk/DataAnalysis.java

@@ -42,7 +42,6 @@ public class DataAnalysis extends AppCompatActivity
     private Context mAlertContext;
     //MainActivity mMainAct = new MainActivity();
     private byte[] mRawdataBytes = new byte[42*30*2*2];
-    private byte[] mManualRef = new byte[42*30*2*2];
     private int[] mManualRefInt = new int[42*30*2];
     private static final int RAWDATA_MESSAGE = 0;
     private static final int LOG1_MESSAG = 1;
@@ -80,11 +79,8 @@ public class DataAnalysis extends AppCompatActivity
     private EditText edt_TestiInformation;  //显示测试过程信息
 
     private boolean isReceiverMessage = true;
-
     private boolean isNeedFindDevice  = true;
 
-    private int bottonMode = 0;
-
     private UsbInterface mUsbInterface;
     private Context mContext;
 
@@ -101,19 +97,18 @@ public class DataAnalysis extends AppCompatActivity
     private TextView tvMinimum;      //显示最小值
     private TextView tvDataContent;  //显示当前处于何种数值模式:原始值、差值、基准……
     private TextView tvMAD;          //显示最大相邻偏差
+    private TextView mtextView;
 
-    public String stTestLog;  //测试信息存放字符串
-    String stTestLogShow= "";  //测试信息合并起来存放字符串
+    public String stTestLog;   //最大最小值测试信息存放字符串
+    String stTestLogShow= "";  //最大最小值测试信息合并起来存放字符串
 
-    public String Update_log;
-    public String Update_log1;
-    String updateLogShow= "";
+    public String Update_log;  //短路测试信息存放字符串
+    String updateLogShow= "";  //短路测试信息合并起来存放字符串
 
     private byte showFlag = 0;  //
     private byte btTestStep = 0;
 
-    private EditText mError;
-    private TextView tvUpDataResult;
+    private EditText edtShortCircuitInfo;  //the info of short circuit test
 
     private static final byte gt9110h_short_dsp_code[] = {
         0x02,0x0c,(byte)0xb7,(byte)0x8f,0x08,0x7e,0x00,0x7f,0x71,0x7d,0x00,0x7b,0x01,0x7a,(byte)0xa5,0x79,
@@ -564,11 +559,11 @@ public class DataAnalysis extends AppCompatActivity
         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.testinformation);  //显示测试过程信息
+        edt_TestiInformation = (EditText) findViewById(R.id.maxandmintestinfo);  //显示测试过程信息
         edt_TestiInformation.setKeyListener(null);
 
-        mError = (EditText) findViewById(R.id.error);
-        mError.setKeyListener(null);
+        edtShortCircuitInfo = (EditText) findViewById(R.id.shortcircuitinfo);
+        edtShortCircuitInfo.setKeyListener(null);
     }
 
     private void InitListener(){
@@ -693,7 +688,6 @@ public class DataAnalysis extends AppCompatActivity
 
                                     //if(0x80 == mUsbEndpointIn)
                                     //mlog1.setEnabled(true);
-                                    //mToggle = false;
                                     //isDetached = true;
                                     isNeedFindDevice = false;
                                     // mSendMessage.setEnabled(true);
@@ -795,9 +789,7 @@ public class DataAnalysis extends AppCompatActivity
             i = mUsbDeviceConnection.bulkTransfer(mUsbEndpointIn, wBuffer, offset, 0x40, 3000);
 
             if (i != 0x40) {
-                // mError.setText("iicWrite Failed");
                 return false;
-
             }
 
             address = address + 63;
@@ -859,9 +851,7 @@ public class DataAnalysis extends AppCompatActivity
             i = mUsbDeviceConnection.bulkTransfer(mUsbEndpointOut, iicWriteData, 0, 0x40, 100);
 
             if (i != 0x40) {
-                //  mError.setText("iicWrite Failed");
                 return false;
-
             }
 
             address = address + 57;
@@ -887,7 +877,6 @@ public class DataAnalysis extends AppCompatActivity
         iicByteData[7] = data;
         if ((null == mUsbEndpointIn) || (null == mUsbEndpointOut)){
             i=0;
-            // mrawlog.setText("mUsbEndpointIn is null");
         }
         else {
             i = mUsbDeviceConnection.bulkTransfer(mUsbEndpointOut, iicByteData, 0, 0x40, 100);
@@ -899,14 +888,6 @@ public class DataAnalysis extends AppCompatActivity
             return false;
     }
 
-    private boolean iicTest() {
-
-        if(isReceiverMessage)
-            return false;
-
-        return true;
-    }
-
     //发送命令,使得S818可以通过IIC向GT9的固定地址读取1byte数据
     private byte iicByteRead(byte addressHigh,byte addressLow) {
 
@@ -918,11 +899,9 @@ public class DataAnalysis extends AppCompatActivity
         iicByteData[6] = 0x01;   //lengthlow
 
         iicByteData[7] = 0x00;
-        //  mThreadPool.execute(new Runnable() {
-        //     @Override
-        //     public void run() {
+
         int i;
-        boolean byteReceiverLoop = true;
+
         i = mUsbDeviceConnection.bulkTransfer(mUsbEndpointOut, iicByteData, 0, 0x40, 100);
         if (i != 0x40)
             return 0x77;  //用0x77来表示传输失败
@@ -931,8 +910,6 @@ public class DataAnalysis extends AppCompatActivity
 
         isReceiverMessage = false;  //先关闭循环接收信息
 
-        // while(byteReceiverLoop) {
-
         i = mUsbDeviceConnection.bulkTransfer(mUsbEndpointIn, mBytes, 0, 0x40, 3000);
 
         SystemClock.sleep(12);  //加长时间,避免数据显示错乱乱闪
@@ -941,32 +918,18 @@ public class DataAnalysis extends AppCompatActivity
             return mBytes[1];
         else
             return 0x77;  //用0x77来表示传输失败
-        // }
-
-        // return 0x77;  //用0x77来表示传输失败
-        // }
-        // });
-
     }
 
     private boolean changeToDebugMode() {
 
-        byte maddressHigh = (byte)0x80;
-        byte maddressLow = (byte)0x46;
-        byte msubcommand =0x0f ;  //
-        byte mdata = (byte)0x01;
-
-        //if(false) {
-        maddressHigh = (byte) 0x80;
-        maddressLow = (byte) 0x40;
-        msubcommand = (byte) 0x06;   //ENTRY_DEBUG_MODE
-        mdata = (byte) 0x01;
+        byte maddressHigh = (byte) 0x80;
+        byte maddressLow = (byte) 0x40;
+        byte msubcommand = (byte) 0x06;   //ENTRY_DEBUG_MODE
+        byte mdata = (byte) 0x01;
 
         if (!iicByteWrite(maddressHigh, maddressLow, msubcommand, mdata)) {
-           // mrawlog.setText("[changeDebug]0x8040 write failed");
             return false;
         }
-        //}
 
         return true;
     }
@@ -980,14 +943,8 @@ public class DataAnalysis extends AppCompatActivity
 
         if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
 
-            //mrawlog.setText("[changeNormal]0x8040 write failed");
-
             return false;
         }
-        else
-        {
-            //mrawlog.setText("[changeNormal]0x8040 write success");
-        }
 
         return true;
     }
@@ -995,60 +952,36 @@ public class DataAnalysis extends AppCompatActivity
 
     byte showAddressHigh = (byte)0x8b;
     byte showAddressLow = (byte)0x98;  //需要显示的 address
-    private int[] datatemp = new int[42*30*2];
+    private int[] datatemp = new int[42 * 30 * 2];
     private boolean getRawdata() {
 
-        byte maddressHigh = (byte)0x80;
-        byte maddressLow = (byte)0x40;  //rawdata address
-        byte msubcommand =0x0d ;  //  READ_SYNC
+        byte maddressHigh = (byte)0x8b;
+        byte maddressLow = (byte)0x98;  //rawdata address
+        byte msubcommand = (byte)0x0d;  //  READ_SYNC
         byte mdata = (byte)0x01;
-        //if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-            // mrawlog.setText("READ_SYNC write failed");
-        //    return false;
-        //}
-
 
         if(!iicRead(showAddressHigh,showAddressLow,mRawdataBytes,colnum * rownum * 2)) {  //读取rawData
-            // mrawlog.setText("iicRead rawdata failed");
             return false;
         }
 
         maddressHigh = (byte)0x81;
         maddressLow = (byte)0x4E;  // SYNC address
-        msubcommand =0x0f ;  //  READ_SYNC
+        msubcommand = 0x0f;        //  READ_SYNC
         mdata = (byte)0x00;
 
-        // MainActivity mMainAct = new MainActivity();
         if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-            //  mrawlog.setText("0x814E_SYNC write failed");
             return false;
         }
 
         return true;
     }
 
-    private TextView mrawlog;
-    private TextView mtextView;
-    //private TextView mt1;
-    //private TextView mt2;
-    //private TextView mt3;
-    //private TextView mt4;
-    //private Button mrd1;
-    //private Button mbk;
-    //private Button mmd;
-    //private Button md;
-    //private Button mr;
-    //private Button msumr;
-
     public void initTextView() {
-        mrawlog = (TextView) findViewById(R.id.rawlog);
         mtextView = (TextView) findViewById(R.id.textView);
         tvMaximum = (TextView) findViewById(R.id.maximumshow);
         tvMinimum = (TextView) findViewById(R.id.minimumshow);
         tvDataContent = (TextView) findViewById(R.id.datacontentshow);
         tvMAD = (TextView) findViewById(R.id.madshow);
-
-        tvUpDataResult = (TextView) findViewById(R.id.updataresult);
     }
 
     int count = 1000;
@@ -1058,7 +991,6 @@ public class DataAnalysis extends AppCompatActivity
             @Override
             public void run() {
 
-                int watch_dog = 0;
                 byte syncFlag = 1;
 
                 if (showFlag == 6)
@@ -1075,9 +1007,8 @@ public class DataAnalysis extends AppCompatActivity
 
                     stTestLogShow = "";
 
-                    stTestLog = "开始测试最大最小值!";
+                    stTestLog = getResources().getString(R.string.startmaxmintest);
                     stTestLogShow = stTestLogShow.concat(stTestLog);
-                    stTestLogShow = stTestLogShow.concat("\n");
                 }
 
                 while(showFlag!=4) {
@@ -1092,7 +1023,7 @@ public class DataAnalysis extends AppCompatActivity
                         byte maddressHigh = (byte) 0x81;
                         byte maddressLow = (byte) 0x4E;  //_rRW_MISCTL__SWRST_B0_
                         syncFlag = iicByteRead(maddressHigh, maddressLow);
-                        watch_dog++;
+
                         //while ((syncFlag == 0 )|| (syncFlag == 0x77)) {
                         if (((syncFlag == 0) || (syncFlag == 0x77)) ){
                             SystemClock.sleep(1);
@@ -1173,7 +1104,6 @@ public class DataAnalysis extends AppCompatActivity
             int tempcol = 0;
             int temprow = 0;
             boolean flag = false;
-            int length;
             String dv;
             int maxdata;
             int mindata;
@@ -1229,19 +1159,10 @@ public class DataAnalysis extends AppCompatActivity
                     tvMinimum.setText(Integer.toString(mindata));
                     break;
 
-                case LOG1_MESSAG://
-                    mrawlog.setText("0x814E_SYNC read failed");
-                    break;
-
                 case CLEAR_MESSAGE://清除数据
                     mtextView.setText("");
                     break;
 
-                case LOG2_MESSAGE://成功发送数据
-
-                    mrawlog.setText("0x814E_SYNC read success,count == 0");
-                    break;
-
                 case CONNECTED_SUCCESS: //连接成功
                     btn_RawdataShow.setEnabled(true);
                     btn_DiffdataShow.setEnabled(true);
@@ -1339,10 +1260,9 @@ public class DataAnalysis extends AppCompatActivity
                 case TEST_DATA_MESSAGE:  //
                     if (1 == btTestStep)
                     {
-                        mError.setText(Update_log);
-                        mError.setSelection(mError.getText().length());
+                        edtShortCircuitInfo.setText(Update_log);
+                        edtShortCircuitInfo.setSelection(edtShortCircuitInfo.getText().length());
 
-                        tvUpDataResult.setText(Update_log1);
                         break;
                     }
 
@@ -1380,17 +1300,16 @@ public class DataAnalysis extends AppCompatActivity
                     }
 
                     byTestCount++;
-                    stTestLog = "采样第" + Integer.toString(byTestCount) + "帧";
+                    stTestLog = getResources().getString(R.string.sampling) + Integer.toString(byTestCount) + getResources().getString(R.string.frame);
 
                     if (byTestCount >= 16)
                     {
-                        stTestLogShow = stTestLogShow.concat(stTestLog);
-                        stTestLogShow = stTestLogShow.concat("\n");
+                        stTestLogShow = "";
 
-                        stTestLog = "测试完成!!";
+                        stTestLog = getResources().getString(R.string.maxmintestfinish);
                         stTestLogShow = stTestLogShow.concat(stTestLog);
-                        stTestLogShow = stTestLogShow.concat("\n");
 
+                    /*
                         stTestLog = "最大值超过阈值的次数:" + Integer.toString(byMaximumOverCount);
                         stTestLogShow = stTestLogShow.concat(stTestLog);
                         stTestLogShow = stTestLogShow.concat("\n");
@@ -1398,59 +1317,53 @@ public class DataAnalysis extends AppCompatActivity
                         stTestLog = "最小值超过阈值的次数:" + Integer.toString(byMinimumOverCount);
                         stTestLogShow = stTestLogShow.concat(stTestLog);
                         stTestLogShow = stTestLogShow.concat("\n");
-
+                    */
                         if (byMaximumOverCount >= 15)
                         {
                             bTestMaxResult = false;
-                            stTestLog = "最大值超限!!";
+                            stTestLog = getResources().getString(R.string.maxoutrange);
                             stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
                         }
                         else if(byMaximumOverCount < 2)
                         {
                             bTestMaxResult = true;
-                            stTestLog = "最大值测试pass";
-                            stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
+                            //stTestLog = "最大值测试pass,";
+                            //stTestLogShow = stTestLogShow.concat(stTestLog);
                         }
                         else
                         {
                             bTestMaxResult = false;
-                            stTestLog = "最大值在临界范围,存在风险!!";
+                            stTestLog = getResources().getString(R.string.maxisrisk);
                             stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
                         }
 
 
                         if (byMinimumOverCount >= 15)
                         {
                             bTestMinResult = false;
-                            stTestLog = "最小值超限!!";
+                            stTestLog = getResources().getString(R.string.minoutrange);
                             stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
                         }
                         else if (byMinimumOverCount < 2)
                         {
                             bTestMinResult = true;
-                            stTestLog = "最小值测试pass";
-                            stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
+                            //stTestLog = "最小值测试pass。";
+                            //stTestLogShow = stTestLogShow.concat(stTestLog);
                         }
                         else
                         {
                             bTestMinResult = false;
-                            stTestLog = "最小值在临界范围,存在风险!!";
+                            stTestLog = getResources().getString(R.string.minisrisk);
                             stTestLogShow = stTestLogShow.concat(stTestLog);
-                            stTestLogShow = stTestLogShow.concat("\n");
                         }
 
                         if ((bTestMaxResult == true) && (bTestMinResult == true))
                         {
-                            stTestLog = "测 试 Pass !!";
+                            stTestLog = getResources().getString(R.string.testpass);
                         }
                         else
                         {
-                            stTestLog = "测 试 NG !!";
+                            stTestLog = getResources().getString(R.string.testng);
                         }
 
                         showFlag = 5;  //stop
@@ -1469,7 +1382,7 @@ public class DataAnalysis extends AppCompatActivity
         }
     };
 
-    //-----------------------------------short test code start-------------------------------------------------------------------------//
+    //-----------------------------------short circuit test code start----------------------------------------------------------------------//
     private int GT9xxxGetRxIndex(int nSensor)
     {
         for (int i = 0; i < 30; i++)
@@ -1500,65 +1413,58 @@ public class DataAnalysis extends AppCompatActivity
 
     boolean memCmp(byte[] sBuffer,byte[] deBuffer,int offset,int length) {
 
-        {
-            try {
-
-                for (int i = 0; i < length; i++) {
-                    if (sBuffer[i] != deBuffer[offset + i]) {
-                        // FwUpdateMessage(L"Recall frame data fail,not equal.", MSG_ERR);
-                        // mError.setText("Recall frame data fail,not equal.");
-                        StringBuilder stringBuilder = new StringBuilder("sBuffer[i]=");
-                        int v = sBuffer[i] & 0xFF;
-                        String hv = Integer.toHexString(v);
-                        stringBuilder.append(hv);
-                        stringBuilder.append(",dBuffer[offset + i]=");
+        try {
 
-                        v = deBuffer[offset + i]& 0xFF;
-                        hv = Integer.toHexString(v);
-                        stringBuilder.append(hv);
-                        stringBuilder.append(",i=");
+            for (int i = 0; i < length; i++) {
+                if (sBuffer[i] != deBuffer[offset + i]) {
+                    StringBuilder stringBuilder = new StringBuilder("sBuffer[i]=");
+                    int v = sBuffer[i] & 0xFF;
+                    String hv = Integer.toHexString(v);
+                    stringBuilder.append(hv);
+                    stringBuilder.append(",dBuffer[offset + i]=");
 
-                        stringBuilder.append(i);
-                        stringBuilder.append(",offset=");
-                        stringBuilder.append(offset);
-                        stringBuilder.append(".\n");
+                    v = deBuffer[offset + i]& 0xFF;
+                    hv = Integer.toHexString(v);
+                    stringBuilder.append(hv);
+                    stringBuilder.append(",i=");
 
+                    stringBuilder.append(i);
+                    stringBuilder.append(",offset=");
+                    stringBuilder.append(offset);
+                    stringBuilder.append(".\n");
 
-                        for (int j = 0; j < 129; i++) {
 
-                            v = sBuffer[i+j] & 0xFF;
-                            hv = Integer.toHexString(v);
-                            stringBuilder.append(hv);
-                            stringBuilder.append(",");
-                        }
-                        return false;
+                    for (int j = 0; j < 129; i++) {
+
+                        v = sBuffer[i+j] & 0xFF;
+                        hv = Integer.toHexString(v);
+                        stringBuilder.append(hv);
+                        stringBuilder.append(",");
                     }
+                    return false;
                 }
-            } catch (ArithmeticException e) {
-                e.printStackTrace();
-            } catch (ArrayIndexOutOfBoundsException e) {
-                e.printStackTrace();
             }
+        } catch (ArithmeticException e) {
+            e.printStackTrace();
+        } catch (ArrayIndexOutOfBoundsException e) {
+            e.printStackTrace();
         }
+
         return true;
     }
 
     boolean recallCheck(byte addressHigh,byte addressLow,byte[] dBuffer,int offset,int length)
     {
-        //BYTE* pbBuf = new BYTE[wLen];
         byte[] recallBuf =new byte[length+0x3000];
 
-        //if(false)
-        {
-            if (!iicRead(addressHigh, addressLow, recallBuf, length)) {
-                return false;
-            }
-            if (!memCmp(recallBuf, dBuffer, offset, length)) {  //recallBuf为回读的数据,dBuffer为源数据
-                return false;
-            }
+        if (!iicRead(addressHigh, addressLow, recallBuf, length)) {
+            return false;
+        }
+        if (!memCmp(recallBuf, dBuffer, offset, length)) {  //recallBuf为回读的数据,dBuffer为源数据
+            return false;
         }
-        return true;
 
+        return true;
     }
 
     private boolean LoadShortFw() {
@@ -1568,7 +1474,7 @@ public class DataAnalysis extends AppCompatActivity
         byte mdata = (byte)0x00;
 
         if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-            Update_log = "[Short Test]Touch IC reset failed";
+            Update_log = "[Short-Circuit Test]Touch IC reset failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1611,7 +1517,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (0x0C != iicByteRead(maddressHigh,maddressLow))
         {
-            Update_log = "[Short Test]Hold IC failed";
+            Update_log = "[Short-Circuit Test]Hold IC failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1622,7 +1528,7 @@ public class DataAnalysis extends AppCompatActivity
         maddressLow = (byte)0xB0;  //_rRW_MISCTL__SWRST_B0_
         if (0x00 != iicByteRead(maddressHigh,maddressLow))
         {
-            Update_log = "[Short Test]Disable watch dog failed";
+            Update_log = "[Short-Circuit Test]Disable watch dog failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1635,7 +1541,7 @@ public class DataAnalysis extends AppCompatActivity
         msubcommand =0x0f ;  //no command
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Clear cache enable failed";
+            Update_log = "[Short-Circuit Test]Clear cache enable failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1648,7 +1554,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Set _rRW_MISCTL__BOOTCTL_B0_ failed";
+            Update_log = "[Short-Circuit Test]Set _rRW_MISCTL__BOOTCTL_B0_ failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1661,7 +1567,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Select _bRW_MISCTL__SRAM_BANK failed";
+            Update_log = "[Short-Circuit Test]Select _bRW_MISCTL__SRAM_BANK failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1674,7 +1580,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Enable _bRW_MISCTL__MEM_CD_EN failed";
+            Update_log = "[Short-Circuit Test]Enable _bRW_MISCTL__MEM_CD_EN failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1686,7 +1592,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicWrite(maddressHigh, maddressLow, gt9110h_short_dsp_code, 0, gt9110h_short_dsp_code.length))
         {
-            Update_log = "[Short Test]Burn 8k ShortFw failed";
+            Update_log = "Burn 8k short circuit Fw failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
             return false;
@@ -1696,7 +1602,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!recallCheck(maddressHigh, maddressLow, gt9110h_short_dsp_code, 0, gt9110h_short_dsp_code.length))
         {
-            Update_log = "[Short Test]Recall check 8k ShortFW failed";
+            Update_log = "Recall check 8k short circuit FW failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1709,7 +1615,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Clear IC run flag failed";
+            Update_log = "[Short-Circuit Test]Clear IC run flag failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1722,7 +1628,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Set _rRW_MISCTL__BOOT_OPT_B0_ failed";
+            Update_log = "[Short-Circuit Test]Set _rRW_MISCTL__BOOT_OPT_B0_ failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1735,7 +1641,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Stop reset CPU failed";
+            Update_log = "[Short-Circuit Test]Stop reset CPU failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1748,7 +1654,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Set _rRW_MISCTL__SWRST_B0_ failed";
+            Update_log = "[Short-Circuit Test]Set _rRW_MISCTL__SWRST_B0_ failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1819,7 +1725,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (3 == i)
         {
-            Update_log = "[Short Test]Short test init failed";
+            Update_log = "Short circuit test init failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
             return false;
@@ -1830,7 +1736,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicWrite(maddressHigh, maddressLow, GT9xxxShortConfig, 0, 80)) {
 
-            Update_log = "[Short Test]Send short config failed";
+            Update_log = "Send short circuit config failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
             return false;
@@ -1845,7 +1751,7 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata))
         {
-            Update_log = "[Short Test]Step9 set _rRW_MISCTL__CLR_IC_RUN failed";
+            Update_log = "[Short-Circuit Test]Step9 set _rRW_MISCTL__CLR_IC_RUN failed!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return false;
         }
@@ -1872,7 +1778,7 @@ public class DataAnalysis extends AppCompatActivity
             SystemClock.sleep(20);
         }
 
-        Update_log = "[Short Test]Short test failed";
+        Update_log = "Short circuit test failed!";
         mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
         return false;
@@ -1902,7 +1808,7 @@ public class DataAnalysis extends AppCompatActivity
         /* step3-1 判断是否有短路 */
         if (0x00 == testResult)
         {
-            Update_log = "[Short Test]Short test finish";
+            Update_log = getResources().getString(R.string.shorttestfinish);
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 		    return true;
         }
@@ -1925,6 +1831,7 @@ public class DataAnalysis extends AppCompatActivity
         int ishortpin1,ishortpin2;
 
         /* step3-5 输出短路通道号和阻抗*/
+        Update_log = "";
 
         /* step3-5-1 计算TX与TX的阻抗*/
         if (TX_TO_TX_SHORT == (testResult & TX_TO_TX_SHORT)
@@ -1934,7 +1841,7 @@ public class DataAnalysis extends AppCompatActivity
             maddressHigh = (byte)0x88;
             maddressLow = (byte)0x60;
             if(!iicRead(maddressHigh,maddressLow,m_txShortData,txShortNum * 149)) {  //读取rawData
-                Update_log = "[Short Test]Step3-4-1 cal impedance of Tx&Tx failed";
+                Update_log = "[Short-Circuit Test]Step3-4-1 cal impedance of Tx&Tx failed!";
                 mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                 return false;
             }
@@ -1967,14 +1874,10 @@ public class DataAnalysis extends AppCompatActivity
                         if (Resistance < 0)
                             Resistance = 0;
 
-                        //CString str;
-                        //str.Format(L"Tx%d and Tx%d: %dK ohm", GT9xxxGetTxIndex(shortPinNum & 0x7F), GT9xxxGetTxIndex(j), Resistance);
-                        //TODO
-
                         ishortpin1 = GT9xxxGetTxIndex(shortPinNum & 0x7F);
                         ishortpin2 = GT9xxxGetTxIndex(j);
 
-                        Update_log = Update_log.concat("[Short Test]Tx" + Integer.toString(ishortpin1) + " and Tx"
+                        Update_log = Update_log.concat("[Short-Circuit Test]Tx" + Integer.toString(ishortpin1) + " and Tx"
                                 + Integer.toString(ishortpin2) + ": " + Integer.toString(Resistance) + "K Ohm\n");
 
                         if (Resistance > 800)
@@ -2006,25 +1909,20 @@ public class DataAnalysis extends AppCompatActivity
                             Resistance = (int)(wSelfCode * 60) / wRxShortCode[j] - 60;
                         }
 
-                        if (Resistance < 0)Resistance = 0;
-                        //CString str;
-                        //str.Format(L"Tx%d and Rx%d: %dK ohm", GT9xxxGetTxIndex(shortPinNum & 0x7F), GT9xxxGetRxIndex(j), Resistance);
-                        //todo
+                        if (Resistance < 0)
+                            Resistance = 0;
 
                         ishortpin1 = GT9xxxGetTxIndex(shortPinNum & 0x7F);
                         ishortpin2 = GT9xxxGetRxIndex(j);
 
-                        Update_log = Update_log.concat("[Short Test]Tx" + Integer.toString(ishortpin1) + " and Rx"
+                        Update_log = Update_log.concat("[Short-Circuit Test]Tx" + Integer.toString(ishortpin1) + " and Rx"
                                 + Integer.toString(ishortpin2) + ": " + Integer.toString(Resistance) + "K Ohm\n");
 
                         if (Resistance > 800)
                         {
-                            //AppendMessage(str, MESSAGE_PAY_ATTENTION);
-
                             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                             continue;
                         }
-                        //AppendMessage(str, MESSAGE_ERR);
 
                         mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                         bFailed = true;
@@ -2038,7 +1936,7 @@ public class DataAnalysis extends AppCompatActivity
             maddressHigh = (byte)0xA0;
             maddressLow = (byte)0xD2;
             if(!iicRead(maddressHigh,maddressLow,m_rxShortData,rxShortNum * 65)) {  //读取rawData
-                Update_log = "[Short Test]Step3-4-2 cal impedance of Rx&Rx failed";
+                Update_log = "[Short-Circuit Test]Step3-4-2 cal impedance of Rx&Rx failed!";
                 mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                 return false;
             }
@@ -2060,21 +1958,17 @@ public class DataAnalysis extends AppCompatActivity
 
                         Resistance = (int)(wSelfCode * 60) / wRxShortCode[j] - 60;
 
-                        if (Resistance < 0)Resistance = 0;
-                        //CString str;
-                        //str.Format(L"Rx%d and Rx%d: %dK ohm", GT9xxxGetRxIndex(shortPinNum & 0x7F), GT9xxxGetRxIndex(j), Resistance);
-                        //todo
+                        if (Resistance < 0)
+                            Resistance = 0;
 
                         ishortpin1 = GT9xxxGetRxIndex(shortPinNum & 0x7F);
                         ishortpin2 = GT9xxxGetRxIndex(j);
 
-                        Update_log = Update_log.concat("[Short Test]Rx" + Integer.toString(ishortpin1) + " and Rx"
+                        Update_log = Update_log.concat("[Short-Circuit Test]Rx" + Integer.toString(ishortpin1) + " and Rx"
                                 + Integer.toString(ishortpin2) + ": " + Integer.toString(Resistance) + "K Ohm\n");
 
                         if (Resistance > 800)
                         {
-                            //AppendMessage(str, MESSAGE_PAY_ATTENTION);
-
                             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                             continue;
                         }
@@ -2092,7 +1986,7 @@ public class DataAnalysis extends AppCompatActivity
             maddressHigh = (byte)0xA5;
             maddressLow = (byte)0x31;
             if(!iicRead(maddressHigh,maddressLow,m_diffCode,144)) {  //读取rawData
-                Update_log = "[Short Test]cal impedance of TRX to GNDAVDD failed";
+                Update_log = "[Short-Circuit Test]cal impedance of TRX to GNDAVDD failed!";
                 mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                 return false;
             }
@@ -2115,26 +2009,22 @@ public class DataAnalysis extends AppCompatActivity
                     Resistance = (int)(52662.85 / DiffData - 40);
                 }
 
-                if (Resistance < 0)Resistance = 0;
+                if (Resistance < 0)
+                    Resistance = 0;
 
-                //CString str;
                 if (i < 42)
                 {
                     ishortpin1 = GT9xxxGetTxIndex(i);
 
                     if ((DiffData & 0x8000) == 0x8000)
                     {
-                        //str.Format(L"TX%d and AVDD: %dK ohm", GT9xxxGetTxIndex(i), Resistance);
-                        //todo
                         if (Resistance < 800)
-                            Update_log = Update_log.concat("[Short Test]Tx" + Integer.toString(ishortpin1) + " and AVDD: " + Integer.toString(Resistance) + "K Ohm\n");
+                            Update_log = Update_log.concat("[Short-Circuit Test]Tx" + Integer.toString(ishortpin1) + " and AVDD: " + Integer.toString(Resistance) + "K Ohm\n");
                     }
                     else
                     {
-                        //str.Format(L"TX%d and GND: %dK ohm", GT9xxxGetTxIndex(i), Resistance);
-                        //todo
                         if (Resistance < 800)
-                            Update_log = Update_log.concat("[Short Test]Tx" + Integer.toString(ishortpin1) + " and GND: " + Integer.toString(Resistance) + "K Ohm\n");
+                            Update_log = Update_log.concat("[Short-Circuit Test]Tx" + Integer.toString(ishortpin1) + " and GND: " + Integer.toString(Resistance) + "K Ohm\n");
                     }
                 }
                 else
@@ -2143,17 +2033,13 @@ public class DataAnalysis extends AppCompatActivity
 
                     if ((DiffData & 0x8000) == 0x8000)
                     {
-                        //str.Format(L"RX%d and AVDD: %dK ohm", GT9xxxGetRxIndex(i - 42), Resistance);
-                        //todo
                         if (Resistance < 800)
-                            Update_log = Update_log.concat("[Short Test]Rx" + Integer.toString(ishortpin1) + " and AVDD: " + Integer.toString(Resistance) + "K Ohm\n");
+                            Update_log = Update_log.concat("[Short-Circuit Test]Rx" + Integer.toString(ishortpin1) + " and AVDD: " + Integer.toString(Resistance) + "K Ohm\n");
                     }
                     else
                     {
-                        //str.Format(L"RX%d and GND: %dK ohm", GT9xxxGetRxIndex(i - 42), Resistance);
-                        //todo
                         if (Resistance < 800)
-                            Update_log = Update_log.concat("[Short Test]Rx" + Integer.toString(ishortpin1) + " and GND: " + Integer.toString(Resistance) + "K Ohm\n");
+                            Update_log = Update_log.concat("[Short-Circuit Test]Rx" + Integer.toString(ishortpin1) + " and GND: " + Integer.toString(Resistance) + "K Ohm\n");
                     }
                 }
                 if (Resistance > 800)
@@ -2181,19 +2067,18 @@ public class DataAnalysis extends AppCompatActivity
         byte mdata = (byte)0x00;
 
         Update_log = "";
-        Update_log1 = "";
         updateLogShow = "";
 
-        Update_log1 = "Start short test,please wait until finishes...";
+        Update_log = getResources().getString(R.string.startshorttest);
         mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
         if (!LoadShortFw())
         {
-            Update_log1 = "Load short FW failed,short test NG!!!";
+            Update_log += ", load FW failed, test is NG!!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
             if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-                Update_log = "[Short Test]Touch IC reset failed";
+                Update_log += "Reset touch IC failed!";
                 mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                 return;
             }
@@ -2202,11 +2087,11 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!SendShortConfig())
         {
-            Update_log1 = "Send short config failed,short test NG!!!";
+            Update_log += ", send config failed, test is NG!!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
             if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-                Update_log = "[Short Test]Touch IC reset failed";
+                Update_log += "Reset touch IC failed!";
                 mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                 return;
             }
@@ -2215,11 +2100,11 @@ public class DataAnalysis extends AppCompatActivity
 
         if (!CalculateShort())
         {
-            Update_log1 = "Short test NG!!!";
+            Update_log += getResources().getString(R.string.shorttestng);
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
 
             if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-                Update_log = "[Short Test]Touch IC reset failed";
+                Update_log = "Reset touch IC failed!";
                 mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
                 return;
             }
@@ -2227,21 +2112,21 @@ public class DataAnalysis extends AppCompatActivity
         }
 
         if(!iicByteWrite(maddressHigh,maddressLow,msubcommand,mdata)) {
-            Update_log1 = "Touch IC reset failed,short test NG!!!";
+            Update_log = "Reset touch IC failed, short-circuit test NG!!";
             mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
             return;
         }
 
-        Update_log1 = "Short test pass!!!";
+        Update_log += getResources().getString(R.string.testpass);
         mHandler.sendEmptyMessage(TEST_DATA_MESSAGE);
     }
 
-    //------------------------------------short test code end----------------------------------------------------------------------//
+    //------------------------------------short circuit test code end------------------------------------------------------------------//
 
     @Override
     public void onClick(final View view) {
 
-        if ((edt_ColNum.getText().length()==0)||(edt_RowNum.getText().length()==0)){
+        if ((edt_ColNum.getText().length() == 0) || (edt_RowNum.getText().length() == 0)){
 
             byte addressH = (byte)0x80;
             byte addressL = (byte)0x47;
@@ -2271,7 +2156,7 @@ public class DataAnalysis extends AppCompatActivity
                 }
             }
             else {
-                Toast.makeText(this,"Cfg读取错误,请手动输入要显示的行列数",Toast.LENGTH_SHORT).show();
+                Toast.makeText(this, getResources().getString(R.string.cfgerror), Toast.LENGTH_SHORT).show();
                 return;
             }
 
@@ -2332,7 +2217,7 @@ public class DataAnalysis extends AppCompatActivity
                 tvDataContent.setText("[" + getResources().getString(R.string.reffdata) + "]");
                 getRawdata();
                 mHandler.sendEmptyMessage(RAWDATA_MESSAGE);
-               // showRawdata();
+
                 break;
 
             case R.id.manualdiff:
@@ -2357,7 +2242,7 @@ public class DataAnalysis extends AppCompatActivity
                 count = 1000;
                 showAddressHigh = (byte)0x8b;
                 showAddressLow = (byte)0x98;
-               // showRawdata();
+
                 break;
 
             case R.id.testting:  //start test
@@ -2383,7 +2268,7 @@ public class DataAnalysis extends AppCompatActivity
 
                 if((iMinimum < (iMaximum / 2)) || (iMinimum > iMaximum))
                 {
-                    Toast.makeText(this,"最小值阈值不能大于最大值阈值或小于最大值阈值的1/2",Toast.LENGTH_SHORT).show();
+                    Toast.makeText(this, getResources().getString(R.string.thresholdlimit), Toast.LENGTH_SHORT).show();
                     btn_RawdataShow.setEnabled(true);
                     btn_DiffdataShow.setEnabled(true);
                     btn_ReffdataShow.setEnabled(true);
@@ -2438,7 +2323,6 @@ public class DataAnalysis extends AppCompatActivity
         }
         mUsbEndpointIn = null;
         mUsbEndpointOut = null;
-        //mToggle = false;
         isReceiverMessage = false;
         isNeedFindDevice = false;
         mThreadPool.shutdownNow();

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

@@ -35,8 +35,6 @@ import android.widget.EditText;
 //import android.widget.RadioButton;
 //import android.widget.RadioGroup;
 import android.widget.TextView;
-import android.widget.Toast;
-
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -623,7 +621,6 @@ public class FirmwareUpdate extends AppCompatActivity
         if (resultCode == Activity.RESULT_OK) {
             if (requestCode == 1) {
                 Uri uri = data.getData();
-                //Toast.makeText(this, "文件路径:" + uri.getPath().toString(), Toast.LENGTH_SHORT).show();
                 edit_search.setText(uri.getPath().toString());
             }
         }

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

@@ -34,7 +34,6 @@ import android.widget.Button;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
 import android.widget.TextView;
-import android.widget.Toast;
 
 import java.net.Inet4Address;
 import java.net.InetAddress;
@@ -79,7 +78,7 @@ public class GT9MainActivity extends AppCompatActivity
     private UsbDeviceConnection mUsbDeviceConnection;
     private UsbEndpoint mUsbEndpointOut;
     private UsbEndpoint mUsbEndpointIn;
-    private byte[] mBytes = new byte[1024 * 8 + 32];
+    //private byte[] mBytes = new byte[1024 * 8 + 32];
     private boolean isNeedFindDevice  = true;
 
     public boolean isS818Device  = false;
@@ -90,13 +89,13 @@ public class GT9MainActivity extends AppCompatActivity
     private Context mShowID;
     private Button btnExit;
 
-    private Button btnConfigSetting;
-    private Button btnFWUpdate;
-    private Button btnDataAnalysis;
-    private Button btnNoiseAnalysis;
-    private Button btnDemoTools;
-    private Button btnIICOperation;
-    private Button btnContactUs;
+    //private Button btnConfigSetting;
+    //private Button btnFWUpdate;
+    //private Button btnDataAnalysis;
+    //private Button btnNoiseAnalysis;
+    //private Button btnDemoTools;
+    //private Button btnIICOperation;
+    //private Button btnContactUs;
 
     public static List<Activity> activityList = new LinkedList();
 
@@ -372,13 +371,13 @@ public class GT9MainActivity extends AppCompatActivity
         //bt_tcpstart.setOnClickListener(this);
         //bt_tcpstart.setEnabled(false);
 
-        btnConfigSetting = findViewById(R.id.ConfigSetting);
-        btnFWUpdate = findViewById(R.id.FWUpdate);
-        btnDataAnalysis = findViewById(R.id.DataAnalysis);
-        btnNoiseAnalysis = findViewById(R.id.NoiseAnalysis);
-        btnDemoTools = findViewById(R.id.DemoTools);
-        btnIICOperation = findViewById(R.id.IICOperation);
-        btnContactUs = findViewById(R.id.ContactUs);
+        //btnConfigSetting = findViewById(R.id.ConfigSetting);
+        //btnFWUpdate = findViewById(R.id.FWUpdate);
+        //btnDataAnalysis = findViewById(R.id.DataAnalysis);
+        //btnNoiseAnalysis = findViewById(R.id.NoiseAnalysis);
+        //btnDemoTools = findViewById(R.id.DemoTools);
+        //btnIICOperation = findViewById(R.id.IICOperation);
+        //btnContactUs = findViewById(R.id.ContactUs);
 
         btnExit = findViewById(R.id.Exit);
         btnExit.setOnClickListener(this);

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

@@ -269,7 +269,7 @@ public class IICOperation extends AppCompatActivity
         String hv;
 
         if (edtAddressInput.getText().length() < 3){
-            Toast.makeText(this,"请输入正确的地址",Toast.LENGTH_SHORT).show();
+            Toast.makeText(this, getResources().getString(R.string.enteraddress), Toast.LENGTH_SHORT).show();
             return;
         }else{
             addressH = (byte)((Integer.parseInt(edtAddressInput.getText().toString(),16) >> 8) & 0xFF);
@@ -342,7 +342,7 @@ public class IICOperation extends AppCompatActivity
 
                 iicWrite(addressH,addressL,mBufferData,0,lengthtemp);
 
-                Toast.makeText(this,"发送成功",Toast.LENGTH_SHORT).show();
+                Toast.makeText(this,"Send successfully",Toast.LENGTH_SHORT).show();
                 break;
 
             default:

+ 7 - 44
app/src/main/java/com/example/administrator/wingcool_gt9_apk/NoiseAnalysis.java

@@ -5,7 +5,6 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.content.res.Resources;
@@ -21,12 +20,7 @@ import android.hardware.usb.UsbManager;
 import android.hardware.usb.UsbRequest;
 import android.net.Uri;
 import android.os.Bundle;
-import android.os.Environment;
-import android.os.Handler;
-import android.os.Message;
 import android.os.SystemClock;
-import android.support.annotation.NonNull;
-import android.support.v4.app.ActivityCompat;
 import android.support.v7.app.AppCompatActivity;
 import android.text.TextUtils;
 import android.util.DisplayMetrics;
@@ -34,8 +28,6 @@ import android.view.View;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.TextView;
-import android.widget.Toast;
-
 
 import com.github.mikephil.charting.charts.LineChart;
 import com.github.mikephil.charting.components.Description;
@@ -47,24 +39,8 @@ import com.github.mikephil.charting.components.YAxis;
 import com.github.mikephil.charting.data.Entry;
 import com.github.mikephil.charting.data.LineData;
 import com.github.mikephil.charting.data.LineDataSet;
-import com.github.mikephil.charting.highlight.Highlight;
-import com.github.mikephil.charting.utils.MPPointF;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.net.DatagramPacket;
-import java.nio.ByteBuffer;
-import java.text.DecimalFormat;
+
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
@@ -72,14 +48,13 @@ import java.util.Locale;
 import java.util.Timer;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-public class NoiseAnalysis extends AppCompatActivity
-        implements    OpenDevicesReceiver.OpenDevicesListener {
+
+public class NoiseAnalysis extends AppCompatActivity implements OpenDevicesReceiver.OpenDevicesListener {
+
     private Context mAlertContext;
     //MainActivity mMainAct = new MainActivity();
-    private byte[] mRawdataBytes = new byte[42*32*2+64*2];
-    private byte[] mManualRef = new byte[42*32*2+64*2];
-    private int[] mManualRefInt = new int[42*32+64];
-   // private int[] mManualRawInt = new int[42*32+64];
+    private byte[] mRawdataBytes = new byte[42*30*2+64*2];
+
     private static final int RAWDATA_MESSAGE = 0;
     private static final int LOG1_MESSAG = 1;
     private static final int CLEAR_MESSAGE= 2;
@@ -104,10 +79,6 @@ public class NoiseAnalysis extends AppCompatActivity
     private UsbEndpoint mUsbEndpointOut;
     private UsbEndpoint mUsbEndpointIn;
     private boolean bIsconnected = false;
-    private Button mSendMessage;
-    private Button mlog1;
-    private Button mSendCfg;
-    private Button mUpdateFW;
 
     private boolean isDetached = false;
     private byte[] mBytes = new byte[1024];
@@ -121,7 +92,6 @@ public class NoiseAnalysis extends AppCompatActivity
 
     private boolean isNeedFindDevice  = true;
 
-    private int bottonMode = 0;
     private int dataLength;
 
     private UsbInterface mUsbInterface;
@@ -195,12 +165,10 @@ public class NoiseAnalysis extends AppCompatActivity
                         addressH = (byte) 0xc6;
                         addressL = (byte) 0xe6;
                         if (!iicRead(addressH, addressL, mRawdataBytes, 156)) {  //读取ADC噪声
-                           // mrawlog.setText("iicRead Noise failed");
-                            //return false;
+
                             startFreq = 0;
                             continue;
                         } else {
-                          //  mHandler.sendEmptyMessage(DIFF_MESSAGE);
 
                             startFreq = mRawdataBytes[0];
                             endFreq = mRawdataBytes[1];
@@ -442,11 +410,8 @@ public class NoiseAnalysis extends AppCompatActivity
                             {
                                 if (mUsbManager.hasPermission(usbDevice)) {
                                     //initAccessory(usbDevice);
-                                    //mSendMessage.setEnabled(true); // dennis_debug
-
                                     // String avalue = "S818 IS PERMISSION";
                                     // mShow.setText(avalue);//输出显示
-                                    //mSendMessage.setEnabled(true);
                                     initDevice();
 
                                 } else {
@@ -534,11 +499,9 @@ public class NoiseAnalysis extends AppCompatActivity
 
 
                                     //if(0x80 == mUsbEndpointIn)
-                                    //mlog1.setEnabled(true);
                                     bIsconnected = false;
                                     //isDetached = true;
                                     isNeedFindDevice = false;
-                                    // mSendMessage.setEnabled(true);
 
                                     mUsbInterface = usbInterface;
                                     mUsbDeviceConnection = mUsbManager.openDevice(usbDevice);

+ 13 - 48
app/src/main/res/layout-hdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-hdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-land-hdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-land-hdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-land-mdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-land-mdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-land-xhdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-land-xhdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-land-xxhdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-land-xxhdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-land-xxxhdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-land-xxxhdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-land/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-land/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-mdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-mdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-xhdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-xhdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-xxhdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-xxhdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout-xxxhdpi/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout-xxxhdpi/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 13 - 48
app/src/main/res/layout/activity_dataanalysis.xml

@@ -27,8 +27,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
-                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                    xmlns:tools="http://schemas.android.com/tools"
+                <LinearLayout
                     android:id="@+id/TextLinearLayout"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
@@ -41,22 +40,10 @@
                     android:orientation="vertical"
                     tools:context=".DataAnalysis">
 
-                    <TextView
-                        android:id="@+id/rawlog"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginTop="8dp"
-                        android:layout_marginEnd="8dp"
-                        android:text=""
-                        android:textSize="16dp"
-                        android:textColor="@color/colorPrimary"/>
-
                     <TextView
                         android:id="@+id/textView"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:layout_marginTop="8dp"
                         android:text=""
                         android:textSize="16dp"/>
                 </LinearLayout>
@@ -79,7 +66,7 @@
                     android:id="@+id/maximum"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
-                    android:layout_marginStart="20dp"
+                    android:layout_marginStart="50dp"
                     android:text="@string/maximum"
                     android:textSize="20dp"/>
 
@@ -164,7 +151,6 @@
                     android:id="@+id/inputrownum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -187,7 +173,6 @@
                     android:id="@+id/inputcolnum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -210,7 +195,6 @@
                     android:id="@+id/inputmaximum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -233,7 +217,6 @@
                     android:id="@+id/inputminimum"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -256,7 +239,6 @@
                     android:id="@+id/inputadjacentdeviation"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_margin="0dp"
                     android:layout_weight="2"
                     android:background="@drawable/bg_frame_search"
                     android:digits="@string/input_num"
@@ -286,9 +268,7 @@
                     android:id="@+id/rawdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/rawdata"
@@ -299,9 +279,7 @@
                     android:id="@+id/diffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/diffdata"
@@ -312,9 +290,7 @@
                     android:id="@+id/reffdata"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/reffdata"
@@ -325,9 +301,7 @@
                     android:id="@+id/manualdiff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualdiff"
@@ -338,9 +312,7 @@
                     android:id="@+id/manualreff"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/manualreff"
@@ -351,9 +323,7 @@
                     android:id="@+id/testting"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/test"
@@ -364,9 +334,7 @@
                     android:id="@+id/stop"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="0dp"
                     android:layout_marginTop="8dp"
-                    android:layout_marginEnd="0dp"
                     android:layout_marginBottom="8dp"
                     android:layout_weight="1"
                     android:text="@string/stop"
@@ -380,33 +348,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginStart="8dp"
-                android:layout_marginTop="0dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginEnd="8dp"
-                android:layout_marginBottom="8dp"
                 android:orientation="horizontal"
                 tools:context=".DataAnalysis">
 
                 <EditText
-                    android:id="@+id/error"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:text=""
-                    android:textSize="20dp" />
-
-                <TextView
-                    android:id="@+id/updataresult"
+                    android:id="@+id/shortcircuitinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textColor="@color/back_red"
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
                 <EditText
-                    android:id="@+id/testinformation"
+                    android:id="@+id/maxandmintestinfo"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
+                    android:background="@null"
+                    android:layout_weight="1"
                     android:text=""
-                    android:textSize="20dp" />
+                    android:textSize="20dp"
+                    android:textAlignment="center"/>
 
             </LinearLayout>
 

+ 2 - 2
app/src/main/res/layout/view_module_switch.xml

@@ -78,9 +78,9 @@
             android:layout_column="3"
             android:layout_gravity="right"
             android:layout_marginRight="5dp"
-            android:text="INT触发方式"
+            android:text="INT Trigger Mode"
             android:textColor="#000000"
-            android:textSize="22dp"/>
+            android:textSize="22dp" />
 
         <Spinner
             android:id="@+id/interrupt"

+ 117 - 0
app/src/main/res/values-en/spinnerlist.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string-array name="stretch_rank">
+        <item>0.4P</item>
+        <item>0.4P</item>
+        <item>special stretch for 42 channels</item>
+        <item>user defined</item>
+    </string-array>
+
+    <string-array name="INT触发方式">
+        <item>rising edge trigger</item>
+        <item>falling edge trigger</item>
+        <item>low level</item>
+        <item>high level</item>
+    </string-array>
+
+    <string-array name="refresh_rate">
+        <item>200Hz</item>
+        <item>167Hz</item>
+        <item>143Hz</item>
+        <item>125Hz</item>
+        <item>111Hz</item>
+        <item>100Hz</item>
+        <item>91Hz</item>
+        <item>83Hz</item>
+        <item>77Hz</item>
+        <item>71Hz</item>
+        <item>67Hz</item>
+        <item>63Hz</item>
+        <item>59Hz</item>
+        <item>56Hz</item>
+        <item>53Hz</item>
+        <item>50Hz</item>
+    </string-array>
+
+    <string-array name="drv_output_r">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+    </string-array>
+
+    <string-array name="dac_gain">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>4</item>
+        <item>5</item>
+        <item>6</item>
+        <item>7</item>
+    </string-array>
+
+    <string-array name="pga_gain">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>4</item>
+        <item>5</item>
+        <item>6</item>
+        <item>7</item>
+    </string-array>
+
+    <string-array name="rx_vcmi">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+    </string-array>
+
+    <string-array name="pga_r">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+    </string-array>
+
+    <string-array name="pga_c">
+        <item>0</item>
+        <item>1</item>
+    </string-array>
+
+    <string-array name="voltage">
+        <item>6V</item>
+        <item>7V</item>
+        <item>8V</item>
+        <item>9V</item>
+        <item>10V</item>
+        <item>11V</item>
+        <item>12V</item>
+        <item>13V</item>
+    </string-array>
+
+    <string-array name="boost_time">
+        <item>50ns</item>
+        <item>65ns</item>
+        <item>80ns</item>
+        <item>100ns</item>
+        <item>150ns</item>
+        <item>200ns</item>
+        <item>300ns</item>
+    </string-array>
+
+    <string-array name="alter_count">
+        <item>normal</item>
+        <item>two alternating</item>
+        <item>four alternating</item>
+    </string-array>
+
+    <string-array name="finger_restrain_pen">
+        <item>none</item>
+        <item>expand 1 channel</item>
+        <item>expand 2 channels</item>
+        <item>expand 3 channels</item>
+    </string-array>
+</resources>

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

@@ -14,7 +14,12 @@
     <string name="ramoperation">Ram Operation</string>
     <string name="contactus">Contact Us</string>
     <string name="exit">Exit</string>
+    <string name="zh">中 文</string>
+    <string name="en">English</string>
+    <string name="landscape">Landscape</string>
+    <string name="portrait">Portrait</string>
 
+    <!-- Activity_config -->
     <string name="chooseconfig">choose config</string>
     <string name="cfgaddr">addr</string>
     <string name="nameandformat">please type the name and format of file</string>
@@ -30,7 +35,7 @@
     <string name="keysetting">Key Setting</string>
     <string name="hoppingsetting">Hopping Setting</string>
 
-
+    <!-- Activity_firmware_update -->
     <string name="readversion">Version</string>
     <string name="choosefile">Choose a file</string>
     <string name="update">Update FW</string>
@@ -38,16 +43,16 @@
     <string name="updatesuccess">UPDATE SUCCESS!!!</string>
     <string name="updatefailed">UPDATE FAILED!!!</string>
 
+    <!-- Activity_data_analysis -->
     <string name="maximum">Maximum:</string>
     <string name="minimum">Minimum:</string>
-    <string name="maxsubmin">Maximum - Minimum:</string>
-    <string name="uniformity">Uniformity:</string>
-    <string name="datacontent">Data Content:</string>
-    <string name="average">AVG:</string>
-    <string name="rmd">RMD:</string>
     <string name="mad">MAD:</string>
-    <string name="rownums">Row Nums</string>
-    <string name="colnums">Col Nums</string>
+    <string name="datacontent">Data Content:</string>
+    <string name="rownums">Sen Num</string>
+    <string name="colnums">Drv Num</string>
+    <string name="maximumthreshold">Maximum Threshold</string>
+    <string name="minimumthreshold">Minimum Threshold</string>
+    <string name="adjacentdeviationthreshold">MAD Threshold</string>
     <string name="rawdata">Rawdata</string>
     <string name="diffdata">Diffdata</string>
     <string name="reffdata">Reffdata</string>
@@ -55,14 +60,32 @@
     <string name="manualreff">Manualreff</string>
     <string name="test">Test</string>
     <string name="stop">Stop</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 max and min value,</string>
+    <string name="sampling">sampling</string>
+    <string name="frame">frame</string>
+    <string name="maxmintestfinish">Max and min value tests are finished.</string>
+    <string name="maxoutrange">Maximum is out of Threshold!</string>
+    <string name="maxisrisk">Maximum value is in the critical range, there is a risk!</string>
+    <string name="minoutrange">Minimum is out of Threshold!</string>
+    <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="startshorttest">Start short-circuit test, Please wait until finishes...</string>
+    <string name="shorttestfinish">Short circuit test is finished!</string>
+    <string name="shorttestng">Short circuit test is NG!</string>
 
+    <!-- Activity_noise_analysis -->
     <string name="currentfrequency">Current Frequency:</string>
     <string name="maximumnoise">Maximum Noise</string>
     <string name="bitfrequency">Bit-Frequency</string>
     <string name="frequencyfactor">Frequency-Factor</string>
 
-    <string name="touchdemo">Touch the screen to demonstrating</string>
+    <!-- Activity_demo_tools -->
+    <string name="touchdemo">Please touch the screen to demonstrating</string>
 
+    <!-- Activity_iic_operation -->
     <string name="regaddr">Address:</string>
     <string name="length">Length:</string>
     <string name="dualbytes">Dual-Bytes</string>
@@ -70,26 +93,18 @@
     <string name="readdata">Read</string>
     <string name="senddata">Send Data(00 AA FF...):</string>
     <string name="writedata">Write</string>
+    <string name="enteraddress">Please enter the correct address</string>
 
-    <string name="starttesting">Start Testing</string>
-    <string name="maximumthreshold">Maximum Threshold</string>
-    <string name="minimumthreshold">Minimum Threshold</string>
-    <string name="uniformitythreshold">Uniformity Threshold</string>
-    <string name="rmdthreshold">RMD Threshold</string>
-    <string name="adjacentdeviationthreshold">MAD Threshold</string>
-
+    <!-- Activity_contact_us -->
     <string name="companyaddr">Address:Room 2008, Chuangxingda Business Building, No.36 Liuxian 3rd Road, Baoan District, Shenzhen</string>
     <string name="telephonenum">Telephone:186 8896 1937</string>
     <string name="emailaddr">Email:max@wingcool.cn</string>
-    <string name="version">APK Version:v1.1.1_20210806-Release Version</string>
+    <string name="version">APK Version:v1.1.1_20210813-Release Version</string>
 
+    <!-- other -->
     <string name="app_name">WingCoolAPK</string>
     <string name="input_num_character">0123456789ABCDEFabcdef</string>
     <string name="input_num">0123456789</string>
     <string name="databuttonsize">18p</string>
 
-    <string name="zh">中 文</string>
-    <string name="en">English</string>
-    <string name="landscape">Landscape</string>
-    <string name="portrait">Portrait</string>
 </resources>

+ 34 - 18
app/src/main/res/values/strings.xml

@@ -14,7 +14,12 @@
     <string name="ramoperation">Ram 操 作</string>
     <string name="contactus">联 系 我 们</string>
     <string name="exit">退  出</string>
+    <string name="zh">中 文</string>
+    <string name="en">English</string>
+    <string name="landscape">横 屏</string>
+    <string name="portrait">竖 屏</string>
 
+    <!-- Activity_config -->
     <string name="chooseconfig">选择配置文件</string>
     <string name="cfgaddr">地址</string>
     <string name="nameandformat">请输入文件名及文件格式</string>
@@ -30,6 +35,7 @@
     <string name="keysetting">按键设置</string>
     <string name="hoppingsetting">跳频设置</string>
 
+    <!-- Activity_firmware_update -->
     <string name="readversion">版 本</string>
     <string name="choosefile">选择文件</string>
     <string name="update">下 载 固 件</string>
@@ -37,16 +43,16 @@
     <string name="updatesuccess">下 载 成 功!!!</string>
     <string name="updatefailed">下 载 失 败!!!</string>
 
+    <!-- Activity_data_analysis -->
     <string name="maximum">最大值:</string>
     <string name="minimum">最小值:</string>
-    <string name="maxsubmin">最大值 - 最小值:</string>
-    <string name="uniformity">一致性:</string>
-    <string name="datacontent">数据内容:</string>
-    <string name="average">平均值:</string>
-    <string name="rmd">相对平均值偏差:</string>
     <string name="mad">最大相邻偏差:</string>
+    <string name="datacontent">数据内容:</string>
     <string name="rownums">感应数</string>
     <string name="colnums">驱动数</string>
+    <string name="maximumthreshold">最大值阈值</string>
+    <string name="minimumthreshold">最小值阈值</string>
+    <string name="adjacentdeviationthreshold">最大相邻偏差阈值</string>
     <string name="rawdata">原始值</string>
     <string name="diffdata">差 值</string>
     <string name="reffdata">基准值</string>
@@ -54,14 +60,32 @@
     <string name="manualreff">手动基准</string>
     <string name="test">测 试</string>
     <string name="stop">停 止</string>
+    <string name="cfgerror">Cfg读取错误,请手动输入要显示的行列数</string>
+    <string name="thresholdlimit">最小值阈值不能大于最大值阈值,或小于最大值阈值的1/2</string>
+    <string name="startmaxmintest">开始进行最大最小值测试,</string>
+    <string name="sampling">采样第</string>
+    <string name="frame">帧</string>
+    <string name="maxmintestfinish">最大最小值测试完成,</string>
+    <string name="maxoutrange">最大值超限!</string>
+    <string name="maxisrisk">最大值在临界范围,存在风险!</string>
+    <string name="minoutrange">最小值超限!</string>
+    <string name="minisrisk">最小值在临界范围,存在风险!</string>
+    <string name="testpass">测试通过!</string>
+    <string name="testng">测试NG!</string>
+    <string name="startshorttest">开始进行短路测试,请等待测试完成……</string>
+    <string name="shorttestfinish">短路测试完成!</string>
+    <string name="shorttestng">短路测试NG!</string>
 
+    <!-- Activity_noise_analysis -->
     <string name="currentfrequency">当前频点:</string>
     <string name="maximumnoise">最大噪声</string>
     <string name="bitfrequency">基频</string>
     <string name="frequencyfactor">频点</string>
 
-    <string name="touchdemo">请点击屏幕进行测试</string>
+    <!-- Activity_demo_tools -->
+    <string name="touchdemo">请点击屏幕进行演示</string>
 
+    <!-- Activity_iic_operation -->
     <string name="regaddr">地 址:</string>
     <string name="length">长 度:</string>
     <string name="dualbytes">双字节显示</string>
@@ -69,26 +93,18 @@
     <string name="readdata">读 取</string>
     <string name="senddata">发 送 数 据 (00 AA FF...):</string>
     <string name="writedata">发 送</string>
+    <string name="enteraddress">请输入正确的地址</string>
 
-    <string name="starttesting">开 始 测 试</string>
-    <string name="maximumthreshold">最大值阈值</string>
-    <string name="minimumthreshold">最小值阈值</string>
-    <string name="uniformitythreshold">一致性阈值</string>
-    <string name="rmdthreshold">相对平均值偏差阈值</string>
-    <string name="adjacentdeviationthreshold">最大相邻偏差阈值</string>
-
+    <!-- Activity_contact_us -->
     <string name="companyaddr">地址:深圳市宝安区留仙三路 36 号创兴达商务大厦 2008 室</string>
     <string name="telephonenum">电话:186 8896 1937</string>
     <string name="emailaddr">邮箱:max@wingcool.cn</string>
-    <string name="version">APK版本:v1.1.1_20210806-发布版本</string>
+    <string name="version">APK版本:v1.1.1_20210813-发布版本</string>
 
+    <!-- other -->
     <string name="app_name">WingCoolAPK</string>
     <string name="input_num_character">0123456789ABCDEFabcdef</string>
     <string name="input_num">0123456789</string>
     <string name="databuttonsize">18p</string>
 
-    <string name="zh">中 文</string>
-    <string name="en">English</string>
-    <string name="landscape">横 屏</string>
-    <string name="portrait">竖 屏</string>
 </resources>