修改接收波形存储记录逻辑
This commit is contained in:
parent
4f835b395f
commit
aafa6226d9
@ -770,6 +770,15 @@ void Uart::DealWave() {
|
||||
wave_trans_ = false;
|
||||
return;
|
||||
}
|
||||
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);
|
||||
|
||||
std::string ran = "";
|
||||
int n = 0;
|
||||
int range = 0;
|
||||
@ -812,17 +821,9 @@ void Uart::DealWave() {
|
||||
g_VecWaveDataZ.clear();
|
||||
VecWaveDataZ.clear();
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user