modify mqtt wave bugs
This commit is contained in:
parent
e53b687b5d
commit
e366e895af
@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
typedef struct statfs DISK, *pDISK;
|
typedef struct statfs DISK, *pDISK;
|
||||||
|
|
||||||
#define SECTION_MAX_LEN 256
|
#define SECTION_MAX_LEN 1024
|
||||||
#define STRVALUE_MAX_LEN 256
|
#define STRVALUE_MAX_LEN 1024
|
||||||
#define LINE_CONTENT_MAX_LEN 256
|
#define LINE_CONTENT_MAX_LEN 1024
|
||||||
//配置文件位置
|
//配置文件位置
|
||||||
#define NETWORK "/etc/network/interfaces"
|
#define NETWORK "/etc/network/interfaces"
|
||||||
#define SYSTEMINFOFILE "/opt/configenv/SystemInfo.json" //系统信息
|
#define SYSTEMINFOFILE "/opt/configenv/SystemInfo.json" //系统信息
|
||||||
|
|||||||
@ -1577,7 +1577,7 @@ std::string JsonData::JsonCmd_Cgi_69(Param_69 ¶m){
|
|||||||
char whereCon[512] = {0};
|
char whereCon[512] = {0};
|
||||||
char updateSql[256] = {0};
|
char updateSql[256] = {0};
|
||||||
if (param.mMode == 1) {
|
if (param.mMode == 1) {
|
||||||
trigerThresholdEnable = writeIntValue("config", "trigerThresholdEnable", param.trigerThresholdEnable, (char *)GlobalConfig::Config_G.c_str());
|
trigerThresholdEnable = writeIntValue("config", "trigerThresholdEnable", param.trigerThresholdEnable ? 1:0, (char *)GlobalConfig::Config_G.c_str());
|
||||||
if(param.vecParam69.size() > 0){
|
if(param.vecParam69.size() > 0){
|
||||||
for (size_t i = 0; i < param.vecParam69.size(); i++)
|
for (size_t i = 0; i < param.vecParam69.size(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -634,6 +634,7 @@ std::string LocalServer::HandleCgi_cmd(std::string &pData) {
|
|||||||
param.mMode = 0;
|
param.mMode = 0;
|
||||||
}
|
}
|
||||||
Json::Value recvDataNodeNo = recvBody["DataNodeNo"];
|
Json::Value recvDataNodeNo = recvBody["DataNodeNo"];
|
||||||
|
param.trigerThresholdEnable = recvBody["threshold"].asBool();
|
||||||
if (recvDataNodeNo.size() > 0)
|
if (recvDataNodeNo.size() > 0)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < recvDataNodeNo.size(); i++) {
|
for (size_t i = 0; i < recvDataNodeNo.size(); i++) {
|
||||||
|
|||||||
@ -1377,6 +1377,10 @@ void Uart::WriteDatFile(int sampleRate, std::string &strMeasurementID, int iChan
|
|||||||
outSize = 8192;
|
outSize = 8192;
|
||||||
outputData = Calculation::fftInterpolate(vecData, outSize);
|
outputData = Calculation::fftInterpolate(vecData, outSize);
|
||||||
zlog_info(zct, " outputData_size %zu ,ACCSampleTime %f", outputData.size(),ACCSampleTime);
|
zlog_info(zct, " outputData_size %zu ,ACCSampleTime %f", outputData.size(),ACCSampleTime);
|
||||||
|
}else if(std::fabs(ACCSampleTime - 1.6) < epsilon){
|
||||||
|
outSize = 5120;
|
||||||
|
outputData = Calculation::fftInterpolate(vecData, outSize);
|
||||||
|
zlog_info(zct, " outputData_size %zu ,ACCSampleTime %f", outputData.size(),ACCSampleTime);
|
||||||
}
|
}
|
||||||
zlog_info(zct, " outputData_size %d ", outputData.size());
|
zlog_info(zct, " outputData_size %d ", outputData.size());
|
||||||
float mean = Calculation::mean(outputData);
|
float mean = Calculation::mean(outputData);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user