diff --git a/main.c b/main.c index 4e8cb02..2431f4a 100644 --- a/main.c +++ b/main.c @@ -59,7 +59,7 @@ int fd; int UPCASE=0; int count_value=0; int getPayloadTime=120*1000;//usecond -char softwareVersion[16]="1.1.12"; +char softwareVersion[16]="1.1.13"; char stationsn[16]="TJ251372224247";//TJ250995217957 char productid[8]="10045"; char appKey[32]="fdhQmhqhvbL1cf1K9mUqt"; @@ -2150,10 +2150,13 @@ int main(int argc, char *argv[]) char *readresult=NULL; char networktype[32]={0}; pthread_t timeout_thread; // 添加超时检测线程变量 + char syscmd[256]={0}; LOG_I("version:%s\n",softwareVersion); #if 1 system("insmod /system/lib/modules/wk2xxx_spi.ko"); + snprintf(syscmd, sizeof(syscmd), "ls Log.*|xargs rm -fr"); + system(syscmd); // 设置时区为 Asia/Shanghai,直接修改 /etc/localtime 软链接 unlink("/etc/localtime"); @@ -2293,6 +2296,7 @@ int main(int argc, char *argv[]) pthread_detach(pt_removeduplicatetag); } +#if 0 ret = pthread_create(&pt_removelog,NULL,thread_removelog,NULL); if(ret!=0){ LOG_I("pthread_create removelog fail\n"); @@ -2301,6 +2305,7 @@ int main(int argc, char *argv[]) LOG_I("pthread_create removelog success\n"); pthread_detach(pt_removelog); } +#endif // 创建超时检测线程 ret = pthread_create(&timeout_thread, NULL, thread_timeout_check, NULL);