4G Version 5.1
This commit is contained in:
parent
7772b08685
commit
f4c938829b
@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus {
|
||||
|
||||
|
||||
//#define NR5G_MODULE
|
||||
//#define Q4G_MODULE
|
||||
#define Q4G_MODULE
|
||||
//#define WIFI_MODULE
|
||||
//#define NR5G_MEIGE
|
||||
|
||||
|
||||
6
main.cpp
6
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++;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user