Merge branch 'master' into Dev
# Conflicts: # ChaosDataPlayer/ChildForm.cpp
This commit is contained in:
commit
a1250befa0
File diff suppressed because it is too large
Load Diff
@ -181,7 +181,7 @@ private:
|
||||
QAction *Rad;
|
||||
|
||||
QCPAxis *yAxis3;
|
||||
QList<QCPAxis*> axes;
|
||||
QList<QCPAxis*> Axis;
|
||||
QCPItemTracer *tracer; //游标
|
||||
QCPItemTracer *tracer2; //游标
|
||||
|
||||
|
||||
@ -1193,9 +1193,6 @@ void MainWidget::ItemCheckStateSlot(QString strID, bool bChecked)
|
||||
QString strChannelType = iter.value().at(0).sensorType;
|
||||
if(strChannelType != "PROXIMETER")
|
||||
return;
|
||||
qDebug() << "speedChannelID" << speedChannelID << endl;
|
||||
qDebug() << "ChannelID" << ChannelID << endl;
|
||||
qDebug() << "size" << mapWaveData[ChannelID].size() << endl;
|
||||
if(speedChannelID == "NONE" || speedChannelID == ""){
|
||||
MyMsgBox(QMessageBox::Warning,"警告","当前文件中没有转速通道数据");
|
||||
return;
|
||||
@ -1259,7 +1256,7 @@ void MainWidget::ItemCheckStateSlot(QString strID, bool bChecked)
|
||||
if((iter.key() == strChannelID)){
|
||||
QString ChannelID = iter.value().at(0).pairChannelID;
|
||||
QString ChannelType = iter.value().at(0).sensorType;
|
||||
if((ChannelType != "PROXIMETER") && (ChannelID == "NONE" || ChannelID == "")){
|
||||
if((ChannelType != "PROXIMETER") /*&& (ChannelID == "NONE" || ChannelID == "")*/){
|
||||
MyMsgBox(QMessageBox::Warning,"警告","请选择径向位移通道");
|
||||
return;
|
||||
}
|
||||
@ -1775,6 +1772,10 @@ void MainWidget::View3D()
|
||||
}
|
||||
void MainWidget::Dat2Csv()
|
||||
{
|
||||
if(mapWaveData.size() < 1){
|
||||
MyMsgBox(QMessageBox::Warning,"警告","请先打开数据文件!");
|
||||
return;
|
||||
}
|
||||
QString dirpath = QFileDialog::getExistingDirectory(this, QStringLiteral("选择目录"), "./", QFileDialog::ShowDirsOnly);
|
||||
|
||||
if(dirpath.isEmpty()) return;
|
||||
@ -2230,7 +2231,7 @@ void MainWidget::ReadDatData(QString strPath,QString strFileName,QString strIP)
|
||||
for (int i = 0; i < waveSize; i++) {
|
||||
file.read((char *)&f, sizeof(f));
|
||||
m_WaveChnData[j].channelId = buf;
|
||||
m_WaveChnData[j].waveData.push_back(f);
|
||||
m_WaveChnData[j].waveData.push_back((double)f);
|
||||
m_WaveChnData[j].Second = Count;
|
||||
}
|
||||
|
||||
@ -2266,13 +2267,13 @@ void MainWidget::ReadDatData(QString strPath,QString strFileName,QString strIP)
|
||||
if(iter->channelId.left(15) == m_WaveChnData[i].channelId.left(15)){
|
||||
wave.waveData = m_WaveChnData[i].waveData;
|
||||
|
||||
float sum = 0.0;
|
||||
double sum = 0.0;
|
||||
if(iter->sensorType == "ACCELEROMETER" || iter->sensorType == "MICROPHONE" ||
|
||||
iter->sensorType == "PROXIMETER" || iter->sensorType == "VELOCITY" ||
|
||||
iter->sensorType == "TACHOMETER" || iter->sensorType == "THRUST" ||
|
||||
iter->sensorType == "FAST_VOLTAGE"){
|
||||
sum = std::accumulate(std::begin(wave.waveData), std::end(wave.waveData), 0.0);
|
||||
float size = m_WaveChnData[i].waveData.size();
|
||||
double size = m_WaveChnData[i].waveData.size();
|
||||
wave.mean = sum/size;
|
||||
|
||||
}else{
|
||||
|
||||
@ -22,7 +22,7 @@ typedef struct tag_WAVE_DATA{
|
||||
int channelNo;
|
||||
int Time;
|
||||
QString pairChannelID;
|
||||
QVector<float> waveData;
|
||||
QVector<double> waveData;
|
||||
QVector<double> waveDataRealTime;
|
||||
QColor linColor;
|
||||
QVector<double> SpeedProfileSpeed;
|
||||
@ -63,7 +63,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
int Second;
|
||||
QString channelId;
|
||||
QVector<float> waveData;
|
||||
QVector<double> waveData;
|
||||
QVector<double> TimeStamp;
|
||||
} WAVE_CHNDATA;
|
||||
|
||||
@ -89,12 +89,13 @@ typedef struct {
|
||||
QVector<double> wavedata; //原始数据
|
||||
QVector<double> wavedataEnv;//包络数据
|
||||
QVector<double> wavedata_DC;
|
||||
QVector<double> wavedataFre;//频域数据
|
||||
QVector<double> TimeStamp;
|
||||
QColor linColor;
|
||||
QString channelType;
|
||||
QString sensorEngineeringUnit;
|
||||
int SamleRate;
|
||||
float mean;
|
||||
double mean;
|
||||
double meanRpm;
|
||||
QString channleName;
|
||||
int iTrigger;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user