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();
|
valdatastatic["dataNodeNo"] = arrRetData[j][0].c_str();
|
||||||
valNodeData.append(valdatastatic);
|
valNodeData.append(valdatastatic);
|
||||||
|
valNodeData.append(valNodeData);
|
||||||
|
|
||||||
root["data"] = valNodeData;
|
root["data"] = valNodeData;
|
||||||
root["TimeStamp"] = atoi(arrRetData[j][8].c_str());
|
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;
|
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];
|
char buf[32];
|
||||||
memset(buf, 0, 32);
|
memset(buf, 0, 32);
|
||||||
sprintf(buf, "%f", resolution);
|
sprintf(buf, "%f", resolution);
|
||||||
|
|||||||
@ -654,12 +654,17 @@ int Uart::DealFeatureValue(const char *pData,uint16_t ushortAdd){
|
|||||||
}
|
}
|
||||||
char logInfo[100] = {0x00};
|
char logInfo[100] = {0x00};
|
||||||
std::vector<uint8_t>& data_vec = map_send_data[ushortAdd];
|
std::vector<uint8_t>& data_vec = map_send_data[ushortAdd];
|
||||||
const uint8_t* send_data = data_vec.data();
|
if (data_vec.size() > 0)
|
||||||
WriteToUart((const char*)send_data, 100);
|
{
|
||||||
mssleep(50000);
|
const uint8_t* send_data = data_vec.data();
|
||||||
WriteToUart((const char*)send_data, 100);
|
WriteToUart((const char*)send_data, 100);
|
||||||
mssleep(50000);
|
mssleep(50000);
|
||||||
WriteToUart((const char*)send_data, 100);
|
WriteToUart((const char*)send_data, 100);
|
||||||
|
mssleep(50000);
|
||||||
|
WriteToUart((const char*)send_data, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
DealAskTask(ushortAdd);
|
DealAskTask(ushortAdd);
|
||||||
DealDataNodeFeature(pData, 0);
|
DealDataNodeFeature(pData, 0);
|
||||||
|
|||||||
@ -1360,32 +1360,32 @@ void Uart::WriteDatFile(int sampleRate, std::string &strMeasurementID, int iChan
|
|||||||
case WAVE_X: {
|
case WAVE_X: {
|
||||||
strFileName = "/opt/data/" + strMeasurementID + "-X.dat";
|
strFileName = "/opt/data/" + strMeasurementID + "-X.dat";
|
||||||
strChannelID = strMeasurementID + "-X";
|
strChannelID = strMeasurementID + "-X";
|
||||||
wave_type = WAVE_X;
|
wave_type = 0;
|
||||||
} break;
|
} break;
|
||||||
case WAVE_Y: {
|
case WAVE_Y: {
|
||||||
strFileName = "/opt/data/" + strMeasurementID + "-Y.dat";
|
strFileName = "/opt/data/" + strMeasurementID + "-Y.dat";
|
||||||
strChannelID = strMeasurementID + "-Y";
|
strChannelID = strMeasurementID + "-Y";
|
||||||
wave_type = WAVE_Y;
|
wave_type = 0;
|
||||||
} break;
|
} break;
|
||||||
case WAVE_Z: {
|
case WAVE_Z: {
|
||||||
strFileName = "/opt/data/" + strMeasurementID + "-Z.dat";
|
strFileName = "/opt/data/" + strMeasurementID + "-Z.dat";
|
||||||
strChannelID = strMeasurementID + "-Z";
|
strChannelID = strMeasurementID + "-Z";
|
||||||
wave_type = WAVE_Z;
|
wave_type = 0;
|
||||||
} break;
|
} break;
|
||||||
case WAVE_LF_X: {
|
case WAVE_LF_X: {
|
||||||
strFileName = "/opt/data/" + strMeasurementID + "-X-LF.dat";
|
strFileName = "/opt/data/" + strMeasurementID + "-X-LF.dat";
|
||||||
strChannelID = strMeasurementID + "-X";
|
strChannelID = strMeasurementID + "-X";
|
||||||
wave_type = WAVE_LF_X;
|
wave_type = 1;
|
||||||
} break;
|
} break;
|
||||||
case WAVE_LF_Y: {
|
case WAVE_LF_Y: {
|
||||||
strFileName = "/opt/data/" + strMeasurementID + "-Y-LF.dat";
|
strFileName = "/opt/data/" + strMeasurementID + "-Y-LF.dat";
|
||||||
strChannelID = strMeasurementID + "-Y";
|
strChannelID = strMeasurementID + "-Y";
|
||||||
wave_type = WAVE_LF_Y;
|
wave_type = 1;
|
||||||
} break;
|
} break;
|
||||||
case WAVE_LF_Z: {
|
case WAVE_LF_Z: {
|
||||||
strFileName = "/opt/data/" + strMeasurementID + "-Z-LF.dat";
|
strFileName = "/opt/data/" + strMeasurementID + "-Z-LF.dat";
|
||||||
strChannelID = strMeasurementID + "-Z";
|
strChannelID = strMeasurementID + "-Z";
|
||||||
wave_type = WAVE_LF_Z;
|
wave_type = 1;
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user