Procházet zdrojové kódy

断网后300秒重启网卡

vothin před 1 rokem
rodič
revize
a14a49832e
3 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. 10 0
      jni/logic/statusbar.cc
  2. binární
      libs/armeabi/libzkgui.so
  3. binární
      obj/activity/statusbar.o

+ 10 - 0
jni/logic/statusbar.cc

@@ -156,7 +156,17 @@ static void updateNetState(){
 		//5分钟仍然断网,则重启
 		if (netOffCount > netOffMax){
 			netOffCount = 0;
+
+			// 网卡重启
+			LOGD("断网300秒,网卡断电重启");
+			std::string heartStr = "NETRESET,1F";
+			LOGD("=====> the heartStr == %s", heartStr.c_str());
+			const char* sendMsg = heartStr.c_str();
+			sendProtocolTo(UART_TTYS2, (byte*)(sendMsg), strlen(sendMsg));
+
 			//重启
+			sleep(3);
+			LOGD("网卡重启无效,程序内部重启");
 			sync();
 			reboot(RB_AUTOBOOT);
 		}

binární
libs/armeabi/libzkgui.so


binární
obj/activity/statusbar.o