2025-06-18T17:28:37
This commit is contained in:
parent
4c578b169b
commit
29866f73c6
@ -36,3 +36,90 @@
|
||||
[2025-06-18 10:04:14,239] Selected Curve:new.xlsx
|
||||
[2025-06-18 10:04:17,332] xMax:94.8474
|
||||
[2025-06-18 10:04:25,159] Selected Curve:new.xlsx
|
||||
[2025-06-18 14:20:14,656] main...
|
||||
[2025-06-18 14:20:14,656] config file existed.
|
||||
[2025-06-18 14:20:14,667] version:1.0.4.0
|
||||
[2025-06-18 14:20:14,676] setEventHandlerEnable...0
|
||||
[2025-06-18 14:20:53,900] slotSendData:9
|
||||
[2025-06-18 14:20:53,900] slotSendData:a5 5a 06 83 50 00 4a a8 46
|
||||
[2025-06-18 14:20:53,900] All data writen.
|
||||
[2025-06-18 14:20:53,901] open serial port.
|
||||
[2025-06-18 14:25:16,037] main...
|
||||
[2025-06-18 14:25:16,039] config file existed.
|
||||
[2025-06-18 14:25:16,049] version:1.0.4.0
|
||||
[2025-06-18 14:25:16,059] setEventHandlerEnable...0
|
||||
[2025-06-18 14:25:28,907] main...
|
||||
[2025-06-18 14:25:28,907] config file existed.
|
||||
[2025-06-18 14:25:28,918] version:1.0.4.0
|
||||
[2025-06-18 14:25:28,927] setEventHandlerEnable...0
|
||||
[2025-06-18 14:25:55,875] slotSendData:9
|
||||
[2025-06-18 14:25:55,875] slotSendData:a5 5a 06 83 50 00 4a a8 46
|
||||
[2025-06-18 14:25:55,875] All data writen.
|
||||
[2025-06-18 14:25:55,876] open serial port.
|
||||
[2025-06-18 14:26:36,472] phase 2 enable.
|
||||
[2025-06-18 14:26:36,472] slotSendData:82
|
||||
[2025-06-18 14:26:36,472] slotSendData:a5 5a 4f 82 50 00 01 00 00 48 43 00 00 a0 41 05 00 01 01 00 00 48 43 00 00 80 3f 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 a2 34
|
||||
[2025-06-18 14:26:36,472] All data writen.
|
||||
[2025-06-18 14:29:32,803] phase 2 enable.
|
||||
[2025-06-18 14:29:32,803] slotSendData:82
|
||||
[2025-06-18 14:29:32,803] slotSendData:a5 5a 4f 82 50 00 01 00 00 48 43 00 00 a0 41 05 00 01 01 00 00 48 43 00 00 80 3f 3d 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 3a 91
|
||||
[2025-06-18 14:29:32,803] All data writen.
|
||||
[2025-06-18 14:29:47,987] start experiment,set soft into experiment mode.
|
||||
[2025-06-18 14:29:47,987] clearExperimentData...
|
||||
[2025-06-18 14:29:47,990] slotSendData:9
|
||||
[2025-06-18 14:29:47,990] slotSendData:a5 5a 06 82 2c 00 01 28 55
|
||||
[2025-06-18 14:29:47,990] All data writen.
|
||||
[2025-06-18 14:31:02,677] Stop experiment ...
|
||||
[2025-06-18 14:31:02,677] slotSendData:9
|
||||
[2025-06-18 14:31:02,677] slotSendData:a5 5a 06 82 2c 00 00 e9 95
|
||||
[2025-06-18 14:31:02,677] All data writen.
|
||||
[2025-06-18 14:31:05,153] filePath:D:/gitfile/analysis_tool/AnalysisTool-release/experiment_data/sample_data/氧化诱导期33.xlsx
|
||||
[2025-06-18 14:31:05,153] writeFile...
|
||||
[2025-06-18 14:31:05,153] write file...
|
||||
[2025-06-18 14:31:05,154] phase vtr size:0
|
||||
[2025-06-18 14:31:05,154] before xlsx save as...
|
||||
[2025-06-18 14:31:15,551] xlsx sample weight:7
|
||||
[2025-06-18 14:31:15,551] Cell does not exist.
|
||||
[2025-06-18 14:31:17,743] xlsx sample weight:1
|
||||
[2025-06-18 14:31:17,743] startLineIndex:11
|
||||
[2025-06-18 14:31:17,743] data size:298
|
||||
[2025-06-18 14:31:17,743] Cell does not exist.
|
||||
[2025-06-18 14:31:19,256] xlsx sample weight:0
|
||||
[2025-06-18 14:31:19,256] startLineIndex:11
|
||||
[2025-06-18 14:31:19,256] data size:3550
|
||||
[2025-06-18 14:31:19,259] Cell does not exist.
|
||||
[2025-06-18 14:31:20,971] clearExperimentData...
|
||||
[2025-06-18 14:31:21,999] xlsx sample weight:7
|
||||
[2025-06-18 14:31:21,999] Cell does not exist.
|
||||
[2025-06-18 14:39:44,122] start experiment,set soft into experiment mode.
|
||||
[2025-06-18 14:39:44,122] clearExperimentData...
|
||||
[2025-06-18 14:39:44,125] slotSendData:9
|
||||
[2025-06-18 14:39:44,125] slotSendData:a5 5a 06 82 2c 00 01 28 55
|
||||
[2025-06-18 14:39:44,125] All data writen.
|
||||
[2025-06-18 14:39:56,333] Stop experiment ...
|
||||
[2025-06-18 14:39:56,333] slotSendData:9
|
||||
[2025-06-18 14:39:56,333] slotSendData:a5 5a 06 82 2c 00 00 e9 95
|
||||
[2025-06-18 14:39:56,333] All data writen.
|
||||
[2025-06-18 14:40:02,447] filePath:D:/gitfile/analysis_tool/AnalysisTool-release/experiment_data/sample_data/氧化诱导期33.xlsx
|
||||
[2025-06-18 14:40:02,447] writeFile...
|
||||
[2025-06-18 14:40:02,447] write file...
|
||||
[2025-06-18 14:40:02,447] phase vtr size:0
|
||||
[2025-06-18 14:40:02,447] before xlsx save as...
|
||||
[2025-06-18 14:40:16,204] phase 2 enable.
|
||||
[2025-06-18 14:40:16,204] slotSendData:82
|
||||
[2025-06-18 14:40:16,204] slotSendData:a5 5a 4f 82 50 00 01 00 00 48 43 00 00 a0 41 05 00 01 01 00 00 48 43 00 00 80 3f 3d 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 3a 91
|
||||
[2025-06-18 14:40:16,204] All data writen.
|
||||
[2025-06-18 14:40:20,620] start experiment,set soft into experiment mode.
|
||||
[2025-06-18 14:40:20,620] clearExperimentData...
|
||||
[2025-06-18 14:40:20,625] slotSendData:9
|
||||
[2025-06-18 14:40:20,625] slotSendData:a5 5a 06 82 2c 00 01 28 55
|
||||
[2025-06-18 14:40:20,625] All data writen.
|
||||
[2025-06-18 14:40:47,212] Stop experiment ...
|
||||
[2025-06-18 14:40:47,212] slotSendData:9
|
||||
[2025-06-18 14:40:47,212] slotSendData:a5 5a 06 82 2c 00 00 e9 95
|
||||
[2025-06-18 14:40:47,212] All data writen.
|
||||
[2025-06-18 14:40:50,598] filePath:D:/gitfile/analysis_tool/AnalysisTool-release/experiment_data/sample_data/氧化诱导期33.xlsx
|
||||
[2025-06-18 14:40:50,598] writeFile...
|
||||
[2025-06-18 14:40:50,598] write file...
|
||||
[2025-06-18 14:40:50,598] phase vtr size:0
|
||||
[2025-06-18 14:40:50,598] before xlsx save as...
|
||||
|
BIN
AnalysisTool-release/experiment_data/sample_data/氧化诱导期33.xlsx
Normal file
BIN
AnalysisTool-release/experiment_data/sample_data/氧化诱导期33.xlsx
Normal file
Binary file not shown.
Binary file not shown.
@ -251,6 +251,10 @@ void XlsxHandler::writeExperimentFile(const QString filePath)
|
||||
row++;
|
||||
|
||||
// phase data.
|
||||
if(Global::_curveExperimentDataVtr.size() < i + 1){
|
||||
continue;
|
||||
}
|
||||
|
||||
QVector<Global::ExperimentData> edVtr =
|
||||
Global::_curveExperimentDataVtr.at(i).dataVtr;
|
||||
|
||||
|
@ -26,6 +26,8 @@ bool _displayTimeValue = false;
|
||||
|
||||
LanguageType _languageType = LanguageType::Chinese;
|
||||
|
||||
bool _experimentOITFlag = false;
|
||||
|
||||
QString converDoubleToStr(const double num)
|
||||
{
|
||||
return QString::number(num,'f',3);
|
||||
|
@ -158,6 +158,8 @@ extern LanguageType _languageType;
|
||||
|
||||
extern AxisMode _axisMode;
|
||||
|
||||
extern bool _experimentOITFlag;
|
||||
|
||||
// common func
|
||||
QString converDoubleToStr(const double);
|
||||
void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]);
|
||||
|
@ -478,6 +478,8 @@ void MainWindow::on_actionStart_triggered()
|
||||
Global::_mode = Global::Mode::Experiment;
|
||||
|
||||
_manuallyStopTheExperimentFlag = false;
|
||||
|
||||
_centralWidget->startExperiment();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionReadOnly_triggered()
|
||||
|
@ -22,8 +22,7 @@ public:
|
||||
static SerialPort *instance();
|
||||
~SerialPort();
|
||||
|
||||
void sendData(const QByteArray &data)
|
||||
{ slotSendData(data); }
|
||||
void sendData(const QByteArray &data){slotSendData(data);}
|
||||
void sendCmd(const E_CMD_TYPE e);
|
||||
static void parserTest();
|
||||
bool openSp();
|
||||
|
@ -197,6 +197,22 @@ QCPCurve* CentralWidget::addCurveData(
|
||||
return _currentCurve;
|
||||
}
|
||||
|
||||
void CentralWidget::startExperiment()
|
||||
{
|
||||
if(Global::_experimentOITFlag){
|
||||
setAxisMode(Global::AxisMode::DoubleY);
|
||||
}else{
|
||||
setAxisMode(Global::AxisMode::SingleY);
|
||||
}
|
||||
|
||||
if(_yAxis2Curve != nullptr){
|
||||
_yAxis2Curve = nullptr;
|
||||
}
|
||||
_customPlot->yAxis2->setRange(0, 400);
|
||||
_customPlot->xAxis->setRange(-5, 400);
|
||||
_customPlot->yAxis->setRange(-20, 20);
|
||||
}
|
||||
|
||||
void CentralWidget::setAnalysisMode(const AnalysisMode mode)
|
||||
{
|
||||
_analysisMode = mode;
|
||||
@ -260,19 +276,7 @@ void CentralWidget::slotModeModify(const Global::Mode mode)
|
||||
|
||||
void CentralWidget::slotRecvCommonData(const CommonData &cd)
|
||||
{
|
||||
static double index = 0.0;
|
||||
|
||||
if(!_currentCurve){
|
||||
logde<<"_currentCurve is nullptr";
|
||||
_currentCurve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis);
|
||||
_currentCurve->setObjectName(Global::ObjectNameExperiemnt);
|
||||
}
|
||||
|
||||
// logde<<"temp:"<<cd.sample_temp<<",dsc:"<<cd.dsc;
|
||||
_currentCurve->addData(index++,cd.sample_temp, cd.dsc);
|
||||
|
||||
// _customPlot->rescaleAxes();
|
||||
_customPlot->replot();
|
||||
logde<<"slotRecvCommonData run time:"<<cd.add_run_time;
|
||||
|
||||
// Record data.
|
||||
if(!Global::_currentCurveExperimentDataPtr){
|
||||
@ -287,12 +291,60 @@ void CentralWidget::slotRecvCommonData(const CommonData &cd)
|
||||
|
||||
if(Global::_currentCurveExperimentDataPtr->dataVtr.empty()){
|
||||
ed.phaseIndex = Global::_currentCurveExperimentDataPtr->phaseIndex;
|
||||
logde<<"current phase index:"<<Global::_currentCurveExperimentDataPtr->phaseIndex;
|
||||
_currentCurve = nullptr;
|
||||
}
|
||||
|
||||
Global::_currentCurveExperimentDataPtr->dataVtr.push_back(ed);
|
||||
}
|
||||
|
||||
// Update ui.
|
||||
static double index = 0.0;
|
||||
|
||||
if(!_currentCurve){
|
||||
logde<<"_currentCurve is nullptr";
|
||||
_currentCurve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis);
|
||||
_currentCurve->setObjectName(Global::ObjectNameExperiemnt);
|
||||
|
||||
Global::_currentCurveExperimentDataPtr->curve = _currentCurve;
|
||||
}
|
||||
|
||||
if(!Global::_experimentOITFlag){
|
||||
_currentCurve->addData(index++,cd.sample_temp, cd.dsc);
|
||||
}else{
|
||||
if(_yAxis2Curve == nullptr){
|
||||
_yAxis2Curve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis2);
|
||||
_yAxis2Curve->setSelectable(QCP::stWhole); // 设置曲线可选
|
||||
_yAxis2Curve->setLineStyle(QCPCurve::lsLine); // 线性连接
|
||||
|
||||
_yAxis2Curve->setObjectName(Global::ObjectNameExperiemnt);
|
||||
|
||||
// 设置曲线颜色
|
||||
QPen pen(Qt::red); // 创建一个红色的画笔
|
||||
pen.setWidth(1); // 设置画笔宽度
|
||||
_yAxis2Curve->setPen(pen); // 将画笔应用到曲线
|
||||
}
|
||||
_yAxis2Curve->addData(index++,cd.add_run_time, cd.sample_temp);
|
||||
|
||||
_currentCurve->addData(index++,cd.add_run_time, cd.dsc);
|
||||
|
||||
// _customPlot->yAxis2->setRange(0, 400);
|
||||
}
|
||||
|
||||
// Set asis xy range.
|
||||
// axis dsc -20 20
|
||||
// time 0 100
|
||||
// temp 0 400
|
||||
|
||||
// _customPlot->xAxis->setRange(0, 400);
|
||||
// _customPlot->yAxis->setRange(-20, 20);
|
||||
|
||||
|
||||
// _customPlot->rescaleAxes();
|
||||
_customPlot->replot();
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
logde<<"_curveExperimentDataVtr size:"
|
||||
<<Global::_curveExperimentDataVtr.size();
|
||||
@ -583,6 +635,7 @@ void CentralWidget::slotSelectionChangedByUser()
|
||||
|
||||
void CentralWidget::uiLoadXlsxFileData()
|
||||
{
|
||||
#if 0
|
||||
// Set axis.
|
||||
_customPlot->yAxis->setVisible(true);
|
||||
_customPlot->yAxis->setLabel(AxisDSC);
|
||||
@ -597,8 +650,12 @@ void CentralWidget::uiLoadXlsxFileData()
|
||||
_customPlot->yAxis2->setVisible(true);
|
||||
_customPlot->yAxis2->setLabel(AxisTemperature);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
if(Global::_curveFileDataVtr.empty()){
|
||||
return;
|
||||
}
|
||||
// Load xlsx file data.
|
||||
QVector<ExperimentData> allDataVtr;
|
||||
for(Global::CurveFileData& cfd:Global::_curveFileDataVtr){
|
||||
@ -608,26 +665,48 @@ void CentralWidget::uiLoadXlsxFileData()
|
||||
allDataVtr.append(pti.dataVtr);
|
||||
|
||||
// Load data.
|
||||
QVector<double> tVtr,xVtr, yVtr;
|
||||
QVector<double> tVtr,tempVtr,timeVtr,dscVtr;
|
||||
int index = 0;
|
||||
for (Global::ExperimentData &ed : pti.dataVtr)
|
||||
{
|
||||
tVtr.push_back(index++);
|
||||
#if 0
|
||||
if(_axisMode == AxisMode::SingleY){
|
||||
xVtr.push_back(ed.sampleTemp);
|
||||
xTempVtr.push_back(ed.sampleTemp);
|
||||
}else{
|
||||
xVtr.push_back(ed.runTime);
|
||||
xTimeVtr.push_back(ed.runTime);
|
||||
}
|
||||
yVtr.push_back(ed.dsc);
|
||||
#endif
|
||||
tempVtr.push_back(ed.sampleTemp);
|
||||
timeVtr.push_back(ed.runTime);
|
||||
|
||||
dscVtr.push_back(ed.dsc);
|
||||
}
|
||||
|
||||
_currentCurve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis);
|
||||
_currentCurve->setData(tVtr, xVtr, yVtr);
|
||||
if(_axisMode == AxisMode::SingleY){
|
||||
_currentCurve->setData(tVtr, tempVtr, dscVtr);
|
||||
}else{
|
||||
_currentCurve->setData(tVtr, timeVtr, dscVtr);
|
||||
}
|
||||
_currentCurve->setSelectable(QCP::stWhole); // 设置曲线可选
|
||||
_currentCurve->setLineStyle(QCPCurve::lsLine); // 线性连接
|
||||
|
||||
_currentCurve->setObjectName(cfd.filePath);
|
||||
|
||||
// add the second axis y curve data.
|
||||
if(_axisMode == AxisMode::DoubleY){
|
||||
QCPCurve *secondCurve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis2);
|
||||
secondCurve->setData(tVtr, timeVtr, tempVtr);
|
||||
secondCurve->setSelectable(QCP::stWhole); // 设置曲线可选
|
||||
secondCurve->setLineStyle(QCPCurve::lsLine); // 线性连接
|
||||
|
||||
secondCurve->setObjectName(cfd.filePath);
|
||||
|
||||
// 设置曲线颜色
|
||||
QPen pen(Qt::red); // 创建一个红色的画笔
|
||||
pen.setWidth(1); // 设置画笔宽度
|
||||
secondCurve->setPen(pen); // 将画笔应用到曲线
|
||||
}
|
||||
#if 0
|
||||
// Set axis range.
|
||||
QPair<float, float> minMaxXAxisPair;
|
||||
@ -662,6 +741,13 @@ void CentralWidget::uiLoadXlsxFileData()
|
||||
}else{
|
||||
// Axis x is time value.
|
||||
minMaxXAxisPair = PointCalculate::getMinAndMaxOfRunTime();
|
||||
|
||||
// Set yAxis2 range.
|
||||
QPair<float, float> minAndMaxPair = PointCalculate::getMinAndMaxOfSampleTemp();
|
||||
QPair<float, float>y2AxisPair = PointCalculate::getMinAndMaxOfAxis(
|
||||
minAndMaxPair.first,minAndMaxPair.second);
|
||||
|
||||
_customPlot->yAxis2->setRange(y2AxisPair.first,y2AxisPair.second);
|
||||
}
|
||||
QPair<float, float>newXAxisPair = PointCalculate::getMinAndMaxOfAxis(
|
||||
minMaxXAxisPair.first,minMaxXAxisPair.second);
|
||||
@ -689,15 +775,6 @@ void CentralWidget::uiLoadXlsxFileData()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
void CentralWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
qDebug()<<"left menu...";
|
||||
QPoint point = event->globalPos();
|
||||
emit sigContextMenuShow(point);
|
||||
}
|
||||
#endif
|
||||
|
||||
void CentralWidget::glassTransitionHandle(const double x1,const double x2,const QString objectName)
|
||||
{
|
||||
QPointF point1 = PointCalculate::getClosestPointByX(x1);
|
||||
@ -1502,7 +1579,6 @@ void CentralWidget::drawOITLine(
|
||||
logde<<"start/end offset:"
|
||||
<<startOffset<<","<<endOffset;
|
||||
|
||||
|
||||
double verticalLineStartY = startData.dsc - startOffset;
|
||||
double verticalLineEndY = startData.dsc - endOffset;
|
||||
|
||||
@ -1556,6 +1632,24 @@ void CentralWidget::setAxisMode(AxisMode mode)
|
||||
{
|
||||
if(_axisMode != mode){
|
||||
_axisMode = mode;
|
||||
|
||||
// Set axis.
|
||||
_customPlot->yAxis->setVisible(true);
|
||||
_customPlot->yAxis->setLabel(AxisDSC);
|
||||
|
||||
if(_axisMode == AxisMode::SingleY){
|
||||
_customPlot->xAxis->setLabel(AxisTemperature);
|
||||
|
||||
_customPlot->yAxis2->setVisible(false);
|
||||
}else{
|
||||
_customPlot->xAxis->setLabel(AxisTime);
|
||||
|
||||
_customPlot->yAxis2->setVisible(true);
|
||||
_customPlot->yAxis2->setLabel(AxisTemperature);
|
||||
}
|
||||
|
||||
_customPlot->replot();
|
||||
|
||||
uiLoadXlsxFileData();
|
||||
}
|
||||
}
|
||||
@ -1575,6 +1669,8 @@ QPixmap CentralWidget::getPixMap()
|
||||
|
||||
void CentralWidget::slotAxisModify(const float temp)
|
||||
{
|
||||
logde<<"slotAxisModify...";
|
||||
|
||||
_customPlot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectPlottables);
|
||||
|
||||
float value = temp + 20;
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
QCPCurve* addCurveData(const QVector<Global::ExperimentData> &,const QString objectName);
|
||||
|
||||
QCPCurve * getCurrentCurve(){return _currentCurve;}
|
||||
|
||||
void startExperiment();
|
||||
signals:
|
||||
void sigContextMenuShow(const QPoint);
|
||||
void sigSendLineXCoord(const int,const double);
|
||||
@ -122,7 +124,7 @@ private:
|
||||
private:
|
||||
AnalysisOperationRecorder::AnalysisMode _analysisMode;
|
||||
LocalCustomPlot *_customPlot;
|
||||
QCPCurve * _currentCurve;
|
||||
QCPCurve * _currentCurve,*_yAxis2Curve;
|
||||
EventHandler* _eventHandler;
|
||||
QCPItemStraightLine *_line1,*_line2;
|
||||
QVector<QCPItemStraightLine*> _lineVtr;
|
||||
|
@ -212,6 +212,36 @@ void ExperimentSettingForm::uiSetPhaseEnable(const int index)
|
||||
}
|
||||
}
|
||||
|
||||
GasType ExperimentSettingForm::conver2GasType(const int index)
|
||||
{
|
||||
switch (index) {
|
||||
case 0: return GasType::NC; break; // 假设 GAS_AIR 是 gas_type 的枚举值
|
||||
case 1: return GasType::N2; break;
|
||||
case 2: return GasType::O2; break;
|
||||
default: return GasType::NC; break; // 处理未知情况
|
||||
}
|
||||
return GasType::NC;
|
||||
}
|
||||
|
||||
bool ExperimentSettingForm::phaseCufoffTempAndTempFlowCheck(const int phaseIndex,
|
||||
const float prePhaseCufoffTemp,
|
||||
const float currentPhaseCufoffTemp,
|
||||
const float tempFlow)
|
||||
{
|
||||
if(tempFlow < 0){
|
||||
phaseScanRateErrorMesgBox(phaseIndex);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(prePhaseCufoffTemp != currentPhaseCufoffTemp
|
||||
&& tempFlow == 0){
|
||||
phaseScanRateErrorMesgBox(phaseIndex);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ExperimentSettingForm::slotPhase2StateChanged(int state)
|
||||
{
|
||||
qDebug() << "slotPhase2StateChanged:" << state;
|
||||
@ -379,8 +409,8 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phase.cutoff_temp = ui->phase_1_cutoff_temp->text().toFloat();
|
||||
phase.temp_flow = ui->phase_1_scan_rate->text().toFloat();
|
||||
phase.constant_temp_time_min = (uint16_t)ui->phase_1_constant_temp->text().toInt();
|
||||
// phase.gas = ui->comboBox_phase_1_atmosphere->currentIndex();
|
||||
phase.gas = GasType::N2;
|
||||
|
||||
phase.gas = conver2GasType(ui->comboBox_phase_1_atmosphere->currentIndex());
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
//
|
||||
@ -390,6 +420,7 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phaseScanRateErrorMesgBox(1);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
@ -398,8 +429,7 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phase.cutoff_temp = ui->phase_2_cutoff_temp->text().toFloat();
|
||||
phase.temp_flow = ui->phase_2_scan_rate->text().toFloat();
|
||||
phase.constant_temp_time_min = (uint16_t)ui->phase_2_constant_temp->text().toInt();
|
||||
// phase.gas = ui->comboBox_phase_1_atmosphere->currentIndex();
|
||||
phase.gas = GasType::N2;
|
||||
phase.gas = conver2GasType(ui->comboBox_phase_2_atmosphere->currentIndex());
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
//
|
||||
@ -411,10 +441,26 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
return;
|
||||
}
|
||||
|
||||
if(phase.temp_flow <= 0){
|
||||
//
|
||||
#if 0
|
||||
if(phase.temp_flow < 0){
|
||||
phaseScanRateErrorMesgBox(2);
|
||||
return;
|
||||
}
|
||||
|
||||
if(phase2CutoffTemp != phase1CutoffTemp
|
||||
&& phase.temp_flow == 0){
|
||||
phaseScanRateErrorMesgBox(2);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if(!phaseCufoffTempAndTempFlowCheck(2,
|
||||
phase1CutoffTemp,
|
||||
phase2CutoffTemp,
|
||||
phase.temp_flow)){
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,7 +470,7 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phase.cutoff_temp = ui->phase_3_cutoff_temp->text().toFloat();
|
||||
phase.temp_flow = ui->phase_3_scan_rate->text().toFloat();
|
||||
phase.constant_temp_time_min = (uint16_t)ui->phase_3_constant_temp->text().toInt();
|
||||
phase.gas = GasType::N2;
|
||||
phase.gas = conver2GasType(ui->comboBox_phase_3_atmosphere->currentIndex());
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
//
|
||||
@ -435,11 +481,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phaseCufoffTempErrorMesgBox(3);
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(phase.temp_flow <= 0){
|
||||
phaseScanRateErrorMesgBox(3);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if(!phaseCufoffTempAndTempFlowCheck(3,
|
||||
phase2CutoffTemp,
|
||||
phase3CutoffTemp,
|
||||
phase.temp_flow)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,8 +502,8 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phase.cutoff_temp = ui->phase_4_cutoff_temp->text().toFloat();
|
||||
phase.temp_flow = ui->phase_4_scan_rate->text().toFloat();
|
||||
phase.constant_temp_time_min = (uint16_t)ui->phase_4_constant_temp->text().toInt();
|
||||
// phase.gas = ui->comboBox_phase_1_atmosphere->currentIndex();
|
||||
phase.gas = GasType::N2;
|
||||
phase.gas = conver2GasType(ui->comboBox_phase_4_atmosphere->currentIndex());
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
//
|
||||
if(phase.onoff){
|
||||
@ -460,11 +513,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phaseCufoffTempErrorMesgBox(4);
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(phase.temp_flow <= 0){
|
||||
phaseScanRateErrorMesgBox(4);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if(!phaseCufoffTempAndTempFlowCheck(4,
|
||||
phase3CutoffTemp,
|
||||
phase4CutoffTemp,
|
||||
phase.temp_flow)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -474,8 +534,7 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phase.cutoff_temp = ui->phase_5_cutoff_temp->text().toFloat();
|
||||
phase.temp_flow = ui->phase_5_scan_rate->text().toFloat();
|
||||
phase.constant_temp_time_min = (uint16_t)ui->phase_5_constant_temp->text().toInt();
|
||||
// phase.gas = ui->comboBox_phase_1_atmosphere->currentIndex();
|
||||
phase.gas = GasType::N2;
|
||||
phase.gas = conver2GasType(ui->comboBox_phase_5_atmosphere->currentIndex());
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
//
|
||||
@ -486,11 +545,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phaseCufoffTempErrorMesgBox(5);
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(phase.temp_flow <= 0){
|
||||
phaseScanRateErrorMesgBox(5);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if(!phaseCufoffTempAndTempFlowCheck(5,
|
||||
phase4CutoffTemp,
|
||||
phase5CutoffTemp,
|
||||
phase.temp_flow)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -500,8 +566,7 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phase.cutoff_temp = ui->phase_6_cutoff_temp->text().toFloat();
|
||||
phase.temp_flow = ui->phase_6_scan_rate->text().toFloat();
|
||||
phase.constant_temp_time_min = (uint16_t)ui->phase_6_constant_temp->text().toInt();
|
||||
// phase.gas = ui->comboBox_phase_1_atmosphere->currentIndex();
|
||||
phase.gas = GasType::N2;
|
||||
phase.gas = conver2GasType(ui->comboBox_phase_6_atmosphere->currentIndex());
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
//
|
||||
@ -512,11 +577,18 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
phaseCufoffTempErrorMesgBox(6);
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(phase.temp_flow <= 0){
|
||||
phaseScanRateErrorMesgBox(6);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if(!phaseCufoffTempAndTempFlowCheck(6,
|
||||
phase5CutoffTemp,
|
||||
phase6CutoffTemp,
|
||||
phase.temp_flow)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -541,8 +613,16 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
QByteArray initialBa;
|
||||
if(ui->radioButton_OIT->isChecked()){
|
||||
initialBa.append((char)0);
|
||||
|
||||
Global::_experimentOITFlag = true;
|
||||
|
||||
logde<<"Global::_experimentOITFlag = true;";
|
||||
}else{
|
||||
initialBa.append((char)1);
|
||||
|
||||
Global::_experimentOITFlag = false;
|
||||
|
||||
logde<<"Global::_experimentOITFlag = false;";
|
||||
}
|
||||
|
||||
char index = ui->comboBox_initial_atmosphere->currentIndex();
|
||||
@ -805,6 +885,9 @@ void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba)
|
||||
}else{
|
||||
ui->radioButton_OIT->setChecked(true);
|
||||
ui->radioButton_OIT_not->setChecked(false);
|
||||
Global::_experimentOITFlag = true;
|
||||
|
||||
logde<<"Global::_experimentOITFlag = true;";
|
||||
#if 0
|
||||
QString oitNotRadioButtonName("radioButton_OIT_not");
|
||||
QRadioButton *oitNotRadioButton =
|
||||
|
@ -31,6 +31,11 @@ private:
|
||||
//ui
|
||||
void uiReset();
|
||||
void uiSetPhaseEnable(const int index);
|
||||
GasType conver2GasType(const int index);
|
||||
bool phaseCufoffTempAndTempFlowCheck(const int phaseIndex,
|
||||
const float prePhaseCufoffTemp,
|
||||
const float currentPhaseCufoffTemp,
|
||||
const float tempFlow);
|
||||
// slot
|
||||
void slotPhaseCheck();
|
||||
void slotPhase2StateChanged(int state);
|
||||
|
Loading…
Reference in New Issue
Block a user