fix bugs , add log
This commit is contained in:
parent
7685e7240c
commit
bc8c843865
@ -1349,6 +1349,7 @@ int SqliteDB::QueryofflineData() {
|
||||
|
||||
valdatastatic["dataNodeNo"] = arrRetData[j][0].c_str();
|
||||
valNodeData.append(valdatastatic);
|
||||
valNodeData.append(valNodeData);
|
||||
|
||||
root["data"] = valNodeData;
|
||||
root["TimeStamp"] = atoi(arrRetData[j][8].c_str());
|
||||
|
||||
@ -672,7 +672,7 @@ std::string JsonData::JsonCmd_Cgi_30(Param_30 ¶m) {
|
||||
resolution = 1 / 3.2;
|
||||
}
|
||||
|
||||
zlog_info(zct, "the sample rate is %d,the resolution %f", SampleRate, resolution);
|
||||
zlog_info(zct, "the sample rate is %d,the resolution %f,fftWave %d", SampleRate, resolution,fftWave.size());
|
||||
char buf[32];
|
||||
memset(buf, 0, 32);
|
||||
sprintf(buf, "%f", resolution);
|
||||
|
||||
@ -654,12 +654,17 @@ int Uart::DealFeatureValue(const char *pData,uint16_t ushortAdd){
|
||||
}
|
||||
char logInfo[100] = {0x00};
|
||||
std::vector<uint8_t>& data_vec = map_send_data[ushortAdd];
|
||||
const uint8_t* send_data = data_vec.data();
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
if (data_vec.size() > 0)
|
||||
{
|
||||
const uint8_t* send_data = data_vec.data();
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
DealAskTask(ushortAdd);
|
||||
DealDataNodeFeature(pData, 0);
|
||||
|
||||
@ -1360,32 +1360,32 @@ void Uart::WriteDatFile(int sampleRate, std::string &strMeasurementID, int iChan
|
||||
case WAVE_X: {
|
||||
strFileName = "/opt/data/" + strMeasurementID + "-X.dat";
|
||||
strChannelID = strMeasurementID + "-X";
|
||||
wave_type = WAVE_X;
|
||||
wave_type = 0;
|
||||
} break;
|
||||
case WAVE_Y: {
|
||||
strFileName = "/opt/data/" + strMeasurementID + "-Y.dat";
|
||||
strChannelID = strMeasurementID + "-Y";
|
||||
wave_type = WAVE_Y;
|
||||
wave_type = 0;
|
||||
} break;
|
||||
case WAVE_Z: {
|
||||
strFileName = "/opt/data/" + strMeasurementID + "-Z.dat";
|
||||
strChannelID = strMeasurementID + "-Z";
|
||||
wave_type = WAVE_Z;
|
||||
wave_type = 0;
|
||||
} break;
|
||||
case WAVE_LF_X: {
|
||||
strFileName = "/opt/data/" + strMeasurementID + "-X-LF.dat";
|
||||
strChannelID = strMeasurementID + "-X";
|
||||
wave_type = WAVE_LF_X;
|
||||
wave_type = 1;
|
||||
} break;
|
||||
case WAVE_LF_Y: {
|
||||
strFileName = "/opt/data/" + strMeasurementID + "-Y-LF.dat";
|
||||
strChannelID = strMeasurementID + "-Y";
|
||||
wave_type = WAVE_LF_Y;
|
||||
wave_type = 1;
|
||||
} break;
|
||||
case WAVE_LF_Z: {
|
||||
strFileName = "/opt/data/" + strMeasurementID + "-Z-LF.dat";
|
||||
strChannelID = strMeasurementID + "-Z";
|
||||
wave_type = WAVE_LF_Z;
|
||||
wave_type = 1;
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user