sync dg102 codes
This commit is contained in:
parent
2e163aff26
commit
dece1b2ebb
@ -1337,6 +1337,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());
|
||||
|
||||
@ -1625,7 +1625,9 @@ std::string JsonData::JsonCmd_Cgi_70(Param_70 ¶m){
|
||||
jsonVal["message"] = " ";
|
||||
char selectCon[256] = {0}, szTableName[100] = {0x00}, whereCon[256] = {0x00};
|
||||
sprintf(szTableName,"t_process_info");
|
||||
int rows = sqlite_db_ctrl::instance().GetTableRows(szTableName, NULL);
|
||||
memset(whereCon, 0x00, sizeof(whereCon));
|
||||
sprintf(whereCon, "timeStamp < '%s' and timeStamp > '%s'", param.timeEnd.c_str(), param.timeStart.c_str());
|
||||
int rows = sqlite_db_ctrl::instance().GetTableRows(szTableName, whereCon);
|
||||
int packgeNo = param.mPackageFlag;
|
||||
int packgeMax = 0;
|
||||
int packgeNum = 0;
|
||||
|
||||
@ -69,7 +69,7 @@ void Uart::RecordBattery(std::string &strLongAddr, DataRecvStatic &dataStatic, s
|
||||
if (dataStatic.nodeSendTime > 0){
|
||||
actualRate = (wave_dataLen / 1024.0f) / (dataStatic.nodeSendTime / 1000.0f); //单位:KB/s
|
||||
}
|
||||
float comprehensiveRSSI = (((zigbeeSignal + zigbeeSignalNode) / 255.0) / 2.0) * (standardRate / actualRate);
|
||||
float comprehensiveRSSI = (((zigbeeSignal + zigbeeSignalNode) / 255.0) / 2.0) * ( actualRate / standardRate);
|
||||
if (comprehensiveRSSI > 1.0f) {
|
||||
comprehensiveRSSI = 1.0f; //综合信号强度最大为1
|
||||
}
|
||||
@ -1340,32 +1340,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