diff --git a/Cidn-SH b/Cidn-SH new file mode 100755 index 0000000..5715a55 Binary files /dev/null and b/Cidn-SH differ diff --git a/common/global.hpp b/common/global.hpp index 0cf2043..0defe3f 100644 --- a/common/global.hpp +++ b/common/global.hpp @@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus { //#define NR5G_MODULE -//#define Q4G_MODULE +#define Q4G_MODULE //#define WIFI_MODULE //#define NR5G_MEIGE diff --git a/main.cpp b/main.cpp index f009fb5..4689ec6 100644 --- a/main.cpp +++ b/main.cpp @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) { #ifdef Q4G_MODULE boost::thread startCSQ(GetCSQ); startCSQ.detach(); - print_info("4G_MODULE \n"); + zlog_info(zbt,"4G_MODULE"); #endif #ifdef WIFI_MODULE @@ -133,10 +133,10 @@ int main(int argc, char *argv[]) { zlog_error(zbt, "(this usually indicates a compiler bug - try recompiling\nwithout optimizations, and enable '-DLZO_DEBUG' for diagnostics)"); } - //int fd = OpenWatchDog(); + int fd = OpenWatchDog(); int count = 0; while (GlobalConfig::QuitFlag_G) { - //WriteWatchDog(fd); + WriteWatchDog(fd); sleep(20); if (GlobalConfig::threadStatus == 0) { count++; diff --git a/threadfunc/thread_func.cpp b/threadfunc/thread_func.cpp index 7caa4fe..c8e2ea3 100644 --- a/threadfunc/thread_func.cpp +++ b/threadfunc/thread_func.cpp @@ -126,7 +126,7 @@ open4G: if (ret <= 0) { timeoutflag++; if (timeoutflag > 5) { - zlog_info("timeoutflag = %d\n", timeoutflag); + zlog_info(zct,"timeoutflag = %d\n", timeoutflag); timeoutflag = 0; const char *str2 = "+QENG: "; char csq[128] = {0}; @@ -135,7 +135,7 @@ open4G: strncpy(csq, pdata + 7, sizeof(csq)); GlobalConfig::NetStatus = GetOneContent(csq, 1, ","); - string signal = GetOneContent(csq, 13, ","); + std::string signal = GetOneContent(csq, 13, ","); GlobalConfig::NetSignal = atoi(signal.c_str()); GlobalConfig::NetType = GetOneContent(csq, 2, ","); zlog_info(zct, "NetStatus = %s,NetSignal = %d", GlobalConfig::NetStatus.c_str(), GlobalConfig::NetSignal);