diff --git a/app/include/common.h b/app/include/common.h index 3e9567f..6bb0b1c 100755 --- a/app/include/common.h +++ b/app/include/common.h @@ -122,6 +122,7 @@ typedef enum _BOOT_MSG BOOT_DAU_ERR_RESET, BOOT_PPP_NO_FOUND, BOOT_PPP_FOUND_LINK_FAIL, + BOOT_TTYUSB_NO_FOUND, BOOT_MAX, } BOOT_MSG; diff --git a/app/lib/a_process/ca_csg.c b/app/lib/a_process/ca_csg.c index 85b1bea..018d4b5 100755 --- a/app/lib/a_process/ca_csg.c +++ b/app/lib/a_process/ca_csg.c @@ -349,7 +349,7 @@ int _csg_response_realtime_data(int sendtype) prtd->StartFlag1 = sysctrl.dev_hex_id; prtd->FarmeType = sendtype; prtd->RunSecCnt = t - sysctrl.start_time; - prtd->Local_Vbat = 6500; + prtd->Local_Vbat = pwr.vbat; prtd->RMS_Ia = cauValues[0]; prtd->RMS_Ib = cauValues[1]; prtd->RMS_Ic = cauValues[2]; diff --git a/app/lib/a_process/ca_network.c b/app/lib/a_process/ca_network.c index afcebc5..f13cddd 100755 --- a/app/lib/a_process/ca_network.c +++ b/app/lib/a_process/ca_network.c @@ -343,8 +343,8 @@ int _network_ppp_check_test(void) FILE *Read_fp; int chars_read; char buffer[1000]; - memset(buffer,0,1000); - memset(cmd,0,100); + memset(buffer,0,sizeof(buffer)); + memset(cmd,0,sizeof(cmd)); sprintf(cmd,"ifconfig | grep ppp0"); Read_fp = popen(cmd,"r"); if(Read_fp != NULL) @@ -487,7 +487,7 @@ void *_network_manage_thread(void *args) if (++reset_cnt >= 6) { reset_cnt = 0; - reboot_system(LOG_NETWORK, BOOT_PPP_NO_FOUND); + reboot_system(LOG_NETWORK, BOOT_TTYUSB_NO_FOUND); } _network_usb_4g_power_on(); diff --git a/app/lib/m_management/common.c b/app/lib/m_management/common.c index 5595b9d..478cfa6 100755 --- a/app/lib/m_management/common.c +++ b/app/lib/m_management/common.c @@ -607,6 +607,7 @@ boot_msg_t g_bootmsg[] = {BOOT_DAU_ERR_RESET, "DAU communicate ERROR."}, {BOOT_PPP_NO_FOUND, "ppp0 not found."}, {BOOT_PPP_FOUND_LINK_FAIL, "ppp0 found but link failed."}, + {BOOT_TTYUSB_NO_FOUND, "/dev/ttyUSB3 not found."}, {BOOT_MAX, NULL} };