diff --git a/uart/uart.cpp b/uart/uart.cpp index 65cd705..d844838 100644 --- a/uart/uart.cpp +++ b/uart/uart.cpp @@ -361,9 +361,7 @@ int Uart::DealAskTask(uint16_t ushortAdd){ } else if (taskID == kScheduleUpgrade) //3.升级 { - zlog_info(zct, " UpdateWirelessNode 2222" ); UpdateWirelessNode(ushortAdd); - zlog_info(zct, " UpdateWirelessNode end1111" ); }else if (taskID == kScheduleConfigSensor) //4.更新配置 { scheduleTask.cmd = CONFIG; @@ -523,7 +521,6 @@ void Uart::DealRecvData(const char *pData) { break; case ASK_TASK: DealAskTask(ushortAdd); - zlog_info(zct, " DealAskTask end11111" ); break; case DEVICE_EXCEPTION: DealException(pData); diff --git a/uart/uart_feature_parse.cpp b/uart/uart_feature_parse.cpp index 60b4016..4af4163 100644 --- a/uart/uart_feature_parse.cpp +++ b/uart/uart_feature_parse.cpp @@ -811,14 +811,17 @@ void Uart::DealWave() { g_VecWaveDataZ.clear(); VecWaveDataZ.clear(); } - char localtimestamp[32] = {0}; - GetTimeNet(localtimestamp, 1); - char insertSql[100] = {0x00}; - char whereCon[50] = {0x00}; - sprintf(whereCon, "MeasurementID='%s'",strMeasurementID.c_str()); - memset(whereCon, 0x00, sizeof(whereCon)); - sprintf(insertSql, "'%s','%02x%02x','%s',0,'1','%s' ", strMeasurementID.c_str(),(wave_shortAddr >> 8) & 0xFF,wave_shortAddr & 0xFF,localtimestamp,""); - sqlite_db_ctrl::instance().InsertData(" receive_wave_status ", insertSql); + if (m_waveCountX > 0 || m_waveCountY > 0 || m_waveCountZ > 0) + { + char localtimestamp[32] = {0}; + GetTimeNet(localtimestamp, 1); + char insertSql[100] = {0x00}; + char whereCon[50] = {0x00}; + sprintf(whereCon, "MeasurementID='%s'",strMeasurementID.c_str()); + memset(whereCon, 0x00, sizeof(whereCon)); + sprintf(insertSql, "'%s','%02x%02x','%s',0,'1','%s' ", strMeasurementID.c_str(),(wave_shortAddr >> 8) & 0xFF,wave_shortAddr & 0xFF,localtimestamp,""); + sqlite_db_ctrl::instance().InsertData(" receive_wave_status ", insertSql); + } wave_trans_ = false; } } diff --git a/uart/uart_parameter_config.cpp b/uart/uart_parameter_config.cpp index f0b7f9d..f868e3b 100644 --- a/uart/uart_parameter_config.cpp +++ b/uart/uart_parameter_config.cpp @@ -168,11 +168,8 @@ void Uart::UpdateWirelessNode(uint16_t shortAdd) { } Data[99] = tmp; sleep(1); - zlog_info(zct, "111111111"); WriteToUart((const char*)Data, 100); - zlog_info(zct, "22222222222"); int iRet = CheckZigbeeACK(); - zlog_info(zct, "333333333333"); if (iRet == 0) { zlog_info(zct, "Packge ACK send success,shortAddr = %02x%02x", UINT16_HIGH(shortAdd), UINT16_LOW(shortAdd)); } else {