| 
					
				 | 
			
			
				@@ -47,6 +47,7 @@ import com.google.android.gms.common.server.converter.StringToIntConverter; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.BufferedReader; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.File; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.FileInputStream; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.io.FileNotFoundException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.IOException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.InputStream; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.InputStreamReader; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -293,14 +294,14 @@ public class Config extends AppCompatActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ViewPager vpagerCfg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ImageView img_cursor; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private TextView tvSample; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TextView tvNormal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TextView tvTxRX; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private TextView tvModuleSwitch; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private TextView tvNormalSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private TextView tvChannelSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private TextView tvPenSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private TextView tvPlamRestrain; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TextView tvOther; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TextView tvSelfSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private TextView tvKeySetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private TextView tvHoppingSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TextView tvLowSignalSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TextView tvExConfig; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private TextView tvCfgRam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ArrayList<View> listViews; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -499,14 +500,14 @@ public class Config extends AppCompatActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void initViewPager() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         vpagerCfg = (ViewPager) findViewById(R.id.vpagercfg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvSample = (TextView) findViewById(R.id.tvsample); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvNormal = (TextView) findViewById(R.id.tvnormal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvTxRX = (TextView) findViewById(R.id.tvtxrx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tvModuleSwitch = (TextView) findViewById(R.id.tvmoduleswitch); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvNormalSetting = (TextView) findViewById(R.id.tvnormal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvChannelSetting = (TextView) findViewById(R.id.tvchannel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvPenSetting = (TextView) findViewById(R.id.tvpen); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvPlamRestrain = (TextView) findViewById(R.id.tvplamrestrain); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvKeySetting = (TextView) findViewById(R.id.tvkey); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvHoppingSetting = (TextView) findViewById(R.id.tvhopping); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvOther = (TextView) findViewById(R.id.tvother); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvSelfSetting = (TextView) findViewById(R.id.tvselfsetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvKeySetting = (TextView) findViewById(R.id.tvkeysetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvLowSignalSetting = (TextView) findViewById(R.id.tvlowsignalsetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvExConfig = (TextView) findViewById(R.id.tvexconfig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tvCfgRam = (TextView) findViewById(R.id.tvcfgram); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         img_cursor = (ImageView) findViewById(R.id.img_cursor); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -568,14 +569,14 @@ public class Config extends AppCompatActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         vpagerCfg.setAdapter(new MyPagerAdapter(listViews)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         vpagerCfg.setCurrentItem(8);          //设置ViewPager当前页,从8开始算,跳到最后ram页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvSample.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvNormal.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvTxRX.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tvModuleSwitch.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvNormalSetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvChannelSetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvPenSetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvPlamRestrain.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvOther.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvSelfSetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tvKeySetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tvHoppingSetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvLowSignalSetting.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tvExConfig.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tvCfgRam.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         vpagerCfg.addOnPageChangeListener(this); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2012,6 +2013,8 @@ public class Config extends AppCompatActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mSendCfg.setOnClickListener(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    byte[] mGt9PScFileData = new byte[197 * 1024 + 512]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void initData() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mContext = getApplicationContext(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mReadCfg.setEnabled(false);    // 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2023,6 +2026,54 @@ public class Config extends AppCompatActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mThreadPool = Executors.newFixedThreadPool(5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ActivityCompat.requestPermissions(  Config.this, new String[]{android 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);   //申请权限,android6.0以上系统首次使用必须添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        StringBuffer buffer = new StringBuffer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        StringBuilder scfilestringbuilder = new StringBuilder(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                InputStream fis = getResources().openRawResource(R.raw.gt7288_2019091201); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //gt9110h_config_20181108 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                fis.read(mGt9PScFileData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //config.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                fis.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } catch (FileNotFoundException e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // mMessage.setText("文件没被发现"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //Update_log = "文件没被发现"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                mHandler.sendEmptyMessage(DEBUG_MESSAGE_ERROR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            catch (IOException e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // mMessage.setText("IOException"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //Update_log = "IOException"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                mHandler.sendEmptyMessage(DEBUG_MESSAGE_ERROR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // mMessage.setText("SD卡不可读写!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //Update_log = "SD卡不可读写!"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            mHandler.sendEmptyMessage(DEBUG_MESSAGE_ERROR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (int i = 0; i < mGt9PScFileData.length; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            mGt9PScFileData[i] -= 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String strGt9PScFileData = new String(mGt9PScFileData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int i = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -3241,35 +3292,35 @@ public class Config extends AppCompatActivity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         byte bCfgEx = 0;  //扩展配置的标志 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         switch (v.getId()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvsample: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvnormal: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvmoduleswitch: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvtxrx: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvnormal: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvmoduleswitch: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvchannel: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvother: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvpen: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvselfsetting: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(4); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvplamrestrain: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvkeysetting: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 5; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvkey: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvlowsignalsetting: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(6); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 6; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case R.id.tvhopping: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            case R.id.tvexconfig: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 vpagerCfg.setCurrentItem(7); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iChooseVPager = 7; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 |