4G Version 5.1

This commit is contained in:
zhangsheng 2024-12-05 17:49:41 +08:00
parent 7772b08685
commit f4c938829b
4 changed files with 6 additions and 6 deletions

BIN
Cidn-SH Executable file

Binary file not shown.

View File

@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus {
//#define NR5G_MODULE //#define NR5G_MODULE
//#define Q4G_MODULE #define Q4G_MODULE
//#define WIFI_MODULE //#define WIFI_MODULE
//#define NR5G_MEIGE //#define NR5G_MEIGE

View File

@ -93,7 +93,7 @@ int main(int argc, char *argv[]) {
#ifdef Q4G_MODULE #ifdef Q4G_MODULE
boost::thread startCSQ(GetCSQ); boost::thread startCSQ(GetCSQ);
startCSQ.detach(); startCSQ.detach();
print_info("4G_MODULE \n"); zlog_info(zbt,"4G_MODULE");
#endif #endif
#ifdef WIFI_MODULE #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)"); 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; int count = 0;
while (GlobalConfig::QuitFlag_G) { while (GlobalConfig::QuitFlag_G) {
//WriteWatchDog(fd); WriteWatchDog(fd);
sleep(20); sleep(20);
if (GlobalConfig::threadStatus == 0) { if (GlobalConfig::threadStatus == 0) {
count++; count++;

View File

@ -126,7 +126,7 @@ open4G:
if (ret <= 0) { if (ret <= 0) {
timeoutflag++; timeoutflag++;
if (timeoutflag > 5) { if (timeoutflag > 5) {
zlog_info("timeoutflag = %d\n", timeoutflag); zlog_info(zct,"timeoutflag = %d\n", timeoutflag);
timeoutflag = 0; timeoutflag = 0;
const char *str2 = "+QENG: "; const char *str2 = "+QENG: ";
char csq[128] = {0}; char csq[128] = {0};
@ -135,7 +135,7 @@ open4G:
strncpy(csq, pdata + 7, sizeof(csq)); strncpy(csq, pdata + 7, sizeof(csq));
GlobalConfig::NetStatus = GetOneContent(csq, 1, ","); GlobalConfig::NetStatus = GetOneContent(csq, 1, ",");
string signal = GetOneContent(csq, 13, ","); std::string signal = GetOneContent(csq, 13, ",");
GlobalConfig::NetSignal = atoi(signal.c_str()); GlobalConfig::NetSignal = atoi(signal.c_str());
GlobalConfig::NetType = GetOneContent(csq, 2, ","); GlobalConfig::NetType = GetOneContent(csq, 2, ",");
zlog_info(zct, "NetStatus = %s,NetSignal = %d", GlobalConfig::NetStatus.c_str(), GlobalConfig::NetSignal); zlog_info(zct, "NetStatus = %s,NetSignal = %d", GlobalConfig::NetStatus.c_str(), GlobalConfig::NetSignal);