fix bugs , add log

This commit is contained in:
zhangsheng 2026-04-01 17:41:07 +08:00
parent 7685e7240c
commit bc8c843865
4 changed files with 19 additions and 13 deletions

View File

@ -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());

View File

@ -672,7 +672,7 @@ std::string JsonData::JsonCmd_Cgi_30(Param_30 &param) {
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);

View File

@ -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];
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);

View File

@ -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;
}