优化异常波形存储逻辑
This commit is contained in:
parent
ef4dd93863
commit
723d7cceb4
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user