2025-03-18T11:43:14
This commit is contained in:
parent
8020ae9dd9
commit
3a229c17c7
7
src/.vscode/settings.json
vendored
7
src/.vscode/settings.json
vendored
@ -1,3 +1,8 @@
|
||||
{
|
||||
"qtConfigure.qtKitDir": "D:/qt/Qt5.14.2/5.14.2/mingw73_64"
|
||||
"qtConfigure.qtKitDir": "D:/qt/Qt5.14.2/5.14.2/mingw73_64",
|
||||
"files.associations": {
|
||||
"array": "cpp",
|
||||
"string": "cpp",
|
||||
"string_view": "cpp"
|
||||
}
|
||||
}
|
@ -1,21 +1,74 @@
|
||||
cmake_minimum_required(VERSION 3.5) # CMake install : https://cmake.org/download/
|
||||
project(qt_new_proj LANGUAGES CXX)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_PREFIX_PATH "D:/qt/Qt5.14.2/5.14.2/mingw73_64") # Qt Kit Dir
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(AnalysisTool VERSION 1.0.0 LANGUAGES CXX)
|
||||
|
||||
# Set C++11 as the minimum standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# Find Qt libraries
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui SerialPort PrintSupport Widgets)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
find_package(Qt5 COMPONENTS Widgets REQUIRED) # Qt COMPONENTS
|
||||
aux_source_directory(./src srcs)
|
||||
|
||||
# Specify MSVC UTF-8 encoding
|
||||
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
||||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
||||
# 定义搜索的文件夹
|
||||
set(SEARCH_FOLDERS
|
||||
${CMAKE_SOURCE_DIR}
|
||||
serialport
|
||||
ui
|
||||
thirdparty/qcustomplot
|
||||
data
|
||||
)
|
||||
|
||||
# 初始化空的源文件列表
|
||||
set(SOURCES "")
|
||||
set(HEADERS "")
|
||||
|
||||
# 分别搜索 .cpp 和 .h 文件
|
||||
foreach(FOLDER ${SEARCH_FOLDERS})
|
||||
file(GLOB_RECURSE TEMP_CPP ${FOLDER}/*.cpp)
|
||||
file(GLOB_RECURSE TEMP_H ${FOLDER}/*.h)
|
||||
list(APPEND SOURCES ${TEMP_CPP})
|
||||
list(APPEND HEADERS ${TEMP_H})
|
||||
endforeach()
|
||||
|
||||
|
||||
set(FORMS
|
||||
mainwindow.ui
|
||||
ui/experimentsettingform.ui
|
||||
ui/realtimedataform.ui
|
||||
)
|
||||
|
||||
# Resources
|
||||
set(RESOURCES
|
||||
images.qrc
|
||||
)
|
||||
|
||||
# Add UI files to the project and automatically run uic
|
||||
qt5_wrap_ui(UI_HEADERS ${FORMS})
|
||||
|
||||
# Add resources to the project and automatically run rcc
|
||||
qt5_add_resources(RESOURCES_RCC ${RESOURCES})
|
||||
|
||||
# Create the executable
|
||||
add_executable(${PROJECT_NAME}
|
||||
WIN32 # If you need a terminal for debug, please comment this statement
|
||||
${srcs}
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets) # Qt5 Shared Library
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
${UI_HEADERS}
|
||||
${RESOURCES_RCC}
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${SEARCH_FOLDERS}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Link against Qt5 libraries
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::SerialPort
|
||||
Qt5::PrintSupport
|
||||
Qt5::Widgets
|
||||
)
|
||||
|
||||
|
@ -8,12 +8,7 @@
|
||||
#include "filemanager.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
, _centralWidget(new CentralWidget)
|
||||
,_leftWidget(new LeftWidget)
|
||||
,_expertmentSettingForm(new ExperimentSettingForm)
|
||||
,_realTimeDataForm(new RealTimeDataForm)
|
||||
: QMainWindow(parent), ui(new Ui::MainWindow), _centralWidget(new CentralWidget), _leftWidget(new LeftWidget), _expertmentSettingForm(new ExperimentSettingForm), _realTimeDataForm(new RealTimeDataForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -42,33 +37,40 @@ MainWindow::~MainWindow()
|
||||
|
||||
void MainWindow::connections()
|
||||
{
|
||||
//ui
|
||||
connect(_expertmentSettingForm,&ExperimentSettingForm::sigDeliverData,
|
||||
SerialPort::instance(),&SerialPort::slotDeliverData);
|
||||
// ui
|
||||
connect(_expertmentSettingForm, &ExperimentSettingForm::sigDeliverData,
|
||||
SerialPort::instance(), &SerialPort::slotDeliverData);
|
||||
#if 1
|
||||
//dynamic data
|
||||
connect(SerialPort::instance(),&SerialPort::sigSendCommonData,
|
||||
_centralWidget,&CentralWidget::slotRevCommonData);
|
||||
connect(SerialPort::instance(),&SerialPort::sigSendCommonData,
|
||||
_realTimeDataForm,&RealTimeDataForm::slotRevCommonData);
|
||||
// dynamic data
|
||||
connect(SerialPort::instance(), &SerialPort::sigSendCommonData,
|
||||
_centralWidget, &CentralWidget::slotRevCommonData);
|
||||
connect(SerialPort::instance(), &SerialPort::sigSendCommonData,
|
||||
_realTimeDataForm, &RealTimeDataForm::slotRevCommonData);
|
||||
|
||||
connect(SerialPort::instance(), &SerialPort::sigSendCommonDataToRealDataForm,
|
||||
_realTimeDataForm, &RealTimeDataForm::slotRevCommonData);
|
||||
|
||||
connect(SerialPort::instance(), &SerialPort::sigSendPhaseInfo,
|
||||
_expertmentSettingForm, &ExperimentSettingForm::slotRecvPhaseInfo);
|
||||
|
||||
connect(SerialPort::instance(),&SerialPort::sigSendCommonDataToRealDataForm,
|
||||
_realTimeDataForm,&RealTimeDataForm::slotRevCommonData);
|
||||
#endif
|
||||
|
||||
//mode
|
||||
connect(Global::instance(),&Global::sigModeModify,
|
||||
_centralWidget,&CentralWidget::slotModeModify);
|
||||
// mode
|
||||
connect(Global::instance(), &Global::sigModeModify,
|
||||
_centralWidget, &CentralWidget::slotModeModify);
|
||||
}
|
||||
|
||||
void MainWindow::setActionEnable(const bool flag)
|
||||
{
|
||||
if(flag){
|
||||
if (flag)
|
||||
{
|
||||
ui->actionNew->setEnabled(true);
|
||||
ui->actionStart->setEnabled(true);
|
||||
ui->actionStop->setEnabled(true);
|
||||
ui->actionRealTimeWidget->setEnabled(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->actionNew->setEnabled(false);
|
||||
ui->actionStart->setEnabled(false);
|
||||
ui->actionStop->setEnabled(false);
|
||||
@ -113,10 +115,15 @@ void MainWindow::on_actionRealTimeWidget_triggered()
|
||||
|
||||
void MainWindow::on_actionConnectToDev_triggered()
|
||||
{
|
||||
if(SerialPort::instance()->openSp()){
|
||||
if (SerialPort::instance()->openSp())
|
||||
{
|
||||
ui->actionNew->setEnabled(true);
|
||||
Global::instance()->setMode(Global::Mode::ConnectedToDev);
|
||||
}else{
|
||||
QThread::msleep(300);
|
||||
SerialPort::instance()->senddata(DataParser::inquirePhaseInfo());
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "warnning", "Serial Port open failed.");
|
||||
}
|
||||
}
|
||||
|
@ -6,35 +6,35 @@
|
||||
#include "defines.h"
|
||||
#include "global.h"
|
||||
|
||||
|
||||
bool DataParser::commonDataParser(const QByteArray &ba, CommonData &cd)
|
||||
namespace DataParser
|
||||
{
|
||||
const char *charArray = ba.data();
|
||||
bool commonDataParser(const QByteArray &ba, CommonData &cd)
|
||||
{
|
||||
const char *charArray = ba.data();
|
||||
|
||||
// 判断前两个字节是否为 0xA5 和 0x5A (小端格式)
|
||||
if (static_cast<unsigned char>(charArray[0]) == 0xA5 &&
|
||||
// 判断前两个字节是否为 0xA5 和 0x5A (小端格式)
|
||||
if (static_cast<unsigned char>(charArray[0]) == 0xA5 &&
|
||||
static_cast<unsigned char>(charArray[1]) == 0x5A)
|
||||
{
|
||||
// std::cout << "前两个字节是 0x5AA5 (小端)" << std::endl;
|
||||
{
|
||||
// std::cout << "前两个字节是 0x5AA5 (小端)" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// std::cout << "前两个字节不是 0x5AA5 (小端)" << std::endl;
|
||||
qDebug() << "header failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (static_cast<unsigned char>(charArray[3]) != 0x83)
|
||||
{
|
||||
qDebug() << "mark failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(&cd, charArray + 6, sizeof(CommonData));
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// std::cout << "前两个字节不是 0x5AA5 (小端)" << std::endl;
|
||||
qDebug()<<"header failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (static_cast<unsigned char>(charArray[3]) != 0x83)
|
||||
{
|
||||
qDebug()<<"mark failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(&cd, charArray + 6, sizeof(CommonData));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
bool DataParser::slotDataParser(const QByteArray &ba)
|
||||
@ -64,80 +64,78 @@ bool DataParser::slotDataParser(const QByteArray &ba)
|
||||
}
|
||||
#endif
|
||||
|
||||
void DataParser::writeData(const QByteArray &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
QByteArray DataParser::connectToDevice(const QVector<Phase> &vtr)
|
||||
{
|
||||
const int phaseLength = sizeof(Phase);
|
||||
const int phaseArrayLength = vtr.size() * phaseLength;
|
||||
char phaseArray[300] = {};
|
||||
int offset = 0;
|
||||
|
||||
for (const Phase &phase : vtr)
|
||||
void writeData(const QByteArray &)
|
||||
{
|
||||
memcpy(phaseArray + offset, &phase, sizeof(Phase));
|
||||
offset += phaseLength;
|
||||
}
|
||||
|
||||
//
|
||||
// int totalDataLength = 0;
|
||||
char totalData[300] = {};
|
||||
QByteArray connectToDevice(const QVector<Phase> &vtr)
|
||||
{
|
||||
const int phaseLength = sizeof(Phase);
|
||||
const int phaseArrayLength = vtr.size() * phaseLength;
|
||||
char phaseArray[300] = {};
|
||||
int offset = 0;
|
||||
|
||||
u16 header = 0x5aa5;
|
||||
memcpy(totalData, (char *)&header, sizeof(u16));
|
||||
// totalDataLength +=2;
|
||||
for (const Phase &phase : vtr)
|
||||
{
|
||||
memcpy(phaseArray + offset, &phase, sizeof(Phase));
|
||||
offset += phaseLength;
|
||||
}
|
||||
|
||||
totalData[2] = 1 + 2 + phaseArrayLength + 2;
|
||||
// totalDataLength++;
|
||||
//
|
||||
// int totalDataLength = 0;
|
||||
char totalData[300] = {};
|
||||
|
||||
totalData[3] = 0x82;
|
||||
// totalDataLength++;
|
||||
u16 header = 0x5aa5;
|
||||
memcpy(totalData, (char *)&header, sizeof(u16));
|
||||
// totalDataLength +=2;
|
||||
|
||||
u16 address = 0x0050;
|
||||
memcpy(totalData + 4, (char *)&address, sizeof(u16));
|
||||
totalData[2] = 1 + 2 + phaseArrayLength + 2;
|
||||
// totalDataLength++;
|
||||
|
||||
memcpy(totalData + 6, phaseArray, phaseArrayLength);
|
||||
totalData[3] = 0x82;
|
||||
// totalDataLength++;
|
||||
|
||||
//
|
||||
char data[300] = {};
|
||||
u16 address = 0x0050;
|
||||
memcpy(totalData + 4, (char *)&address, sizeof(u16));
|
||||
|
||||
data[0] = 0x82;
|
||||
memcpy(totalData + 6, phaseArray, phaseArrayLength);
|
||||
|
||||
// u16 address = 0x0050;
|
||||
memcpy(data + 1, (char *)&address, sizeof(u16));
|
||||
//
|
||||
char data[300] = {};
|
||||
|
||||
memcpy(data + 3, phaseArray, phaseArrayLength);
|
||||
data[0] = 0x82;
|
||||
|
||||
u16 crc = modbusCRC16((u8 *)data, 3 + phaseArrayLength);
|
||||
//
|
||||
memcpy(totalData + 6 + phaseArrayLength, (char *)&crc, sizeof(u16));
|
||||
// u16 address = 0x0050;
|
||||
memcpy(data + 1, (char *)&address, sizeof(u16));
|
||||
|
||||
//
|
||||
memcpy(data + 3, phaseArray, phaseArrayLength);
|
||||
|
||||
return QByteArray(totalData, 6 + phaseArrayLength + 2);
|
||||
}
|
||||
u16 crc = modbusCRC16((u8 *)data, 3 + phaseArrayLength);
|
||||
//
|
||||
memcpy(totalData + 6 + phaseArrayLength, (char *)&crc, sizeof(u16));
|
||||
|
||||
QByteArray DataParser::setDeviceStartStop(const DeviceStartMode mode)
|
||||
{
|
||||
//
|
||||
|
||||
return QByteArray(totalData, 6 + phaseArrayLength + 2);
|
||||
}
|
||||
|
||||
QByteArray setDeviceStartStop(const DeviceStartMode mode)
|
||||
{
|
||||
#if 1
|
||||
SerialPortProtocol spp;
|
||||
spp.head = FRANE_HEAD;
|
||||
spp.len = 1 + 2 + 1 + 2;
|
||||
spp.cmd = WRITE_CMD;
|
||||
spp.addr = 0x002c;
|
||||
spp.data_buf[0] = mode;
|
||||
SerialPortProtocol spp;
|
||||
spp.head = FRANE_HEAD;
|
||||
spp.len = 1 + 2 + 1 + 2;
|
||||
spp.cmd = WRITE_CMD;
|
||||
spp.addr = 0x002c;
|
||||
spp.data_buf[0] = mode;
|
||||
|
||||
int sppValidLength = 6 + 1;
|
||||
int sppValidLength = 6 + 1;
|
||||
|
||||
u8 *dataPtr = (u8*)&spp;
|
||||
u16 crc = modbusCRC16((u8*)(dataPtr + 3),4);
|
||||
u8 *dataPtr = (u8 *)&spp;
|
||||
u16 crc = modbusCRC16((u8 *)(dataPtr + 3), 4);
|
||||
|
||||
return QByteArray((char*)&spp,sppValidLength) +
|
||||
QByteArray((char*)&crc,2);
|
||||
return QByteArray((char *)&spp, sppValidLength) +
|
||||
QByteArray((char *)&crc, 2);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
@ -166,28 +164,50 @@ QByteArray DataParser::setDeviceStartStop(const DeviceStartMode mode)
|
||||
|
||||
return QByteArray(data,length);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
unsigned short DataParser::modbusCRC16(unsigned char *data, unsigned short length)
|
||||
{
|
||||
unsigned short crc = 0xFFFF;
|
||||
unsigned char i;
|
||||
for (unsigned short j = 0; j < length; j++)
|
||||
unsigned short modbusCRC16(unsigned char *data, unsigned short length)
|
||||
{
|
||||
crc ^= (unsigned short)data[j];
|
||||
for (i = 0; i < 8; i++)
|
||||
unsigned short crc = 0xFFFF;
|
||||
unsigned char i;
|
||||
for (unsigned short j = 0; j < length; j++)
|
||||
{
|
||||
if (crc & 0x0001)
|
||||
crc ^= (unsigned short)data[j];
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
crc = (crc >> 1) ^ 0xA001;
|
||||
}
|
||||
else
|
||||
{
|
||||
crc = crc >> 1;
|
||||
if (crc & 0x0001)
|
||||
{
|
||||
crc = (crc >> 1) ^ 0xA001;
|
||||
}
|
||||
else
|
||||
{
|
||||
crc = crc >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// CRC结果低字节在前,高字节在后
|
||||
return crc;
|
||||
}
|
||||
// CRC结果低字节在前,高字节在后
|
||||
return crc;
|
||||
}
|
||||
|
||||
QByteArray inquirePhaseInfo()
|
||||
{
|
||||
SerialPortProtocol spp;
|
||||
spp.head = FRANE_HEAD;
|
||||
spp.cmd = READ_CMD;
|
||||
spp.addr = 0x0050;
|
||||
|
||||
//
|
||||
int inquireDataLength = (u8)sizeof(Phase) * 6;
|
||||
|
||||
spp.data_buf[0] = inquireDataLength;
|
||||
spp.len = 5 + inquireDataLength;
|
||||
//
|
||||
int crcDataLength = 3 + inquireDataLength;
|
||||
u8 *dataPtr = (u8 *)&spp;
|
||||
u16 crc = modbusCRC16((u8 *)(dataPtr + 3), crcDataLength);
|
||||
//
|
||||
int sppValidLength = 6 + inquireDataLength;
|
||||
return QByteArray((char *)&spp, sppValidLength) +
|
||||
QByteArray((char *)&crc, 2);
|
||||
}
|
||||
};
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
namespace DataParser {
|
||||
QByteArray connectToDevice(const QVector<Phase>&);
|
||||
QByteArray inquirePhaseInfo();
|
||||
QByteArray setDeviceStartStop(const DeviceStartMode);
|
||||
|
||||
bool commonDataParser(const QByteArray&ba,CommonData &cd);
|
||||
@ -18,30 +19,4 @@ void writeData(const QByteArray&);
|
||||
unsigned short modbusCRC16(unsigned char *data,unsigned short length);
|
||||
}
|
||||
|
||||
#if 0
|
||||
class DataParser
|
||||
{
|
||||
public:
|
||||
void dataParser(const QByteArray& ba);
|
||||
|
||||
static unsigned short modbusCRC16(unsigned char *data,unsigned short length);
|
||||
static QByteArray connectToDevice(const QVector<Phase>&);
|
||||
static QByteArray setDeviceStartStop(const DeviceStartMode);
|
||||
|
||||
static bool commonDataParser(const QByteArray&ba,CommonData &cd);
|
||||
bool revDataParser(const QByteArray&ba);
|
||||
#if 0
|
||||
public slots:
|
||||
void slotDataParser(const QByteArray& ba);
|
||||
signals:
|
||||
void sigSendCommonData(const CommonData&);
|
||||
void sigSendCommonDataToRealDataForm(const CommonData&);
|
||||
#endif
|
||||
private:
|
||||
void writeData(const QByteArray&);
|
||||
void readData(const QByteArray&);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#endif // DATAPARSER_H
|
||||
|
@ -6,87 +6,88 @@
|
||||
#define FRANE_HEAD 0x5AA5 //枕头
|
||||
#define WRITE_CMD 0x82 //写指令
|
||||
#define READ_CMD 0x83 //读指令
|
||||
#define PHASE_START_ADDR 0X0050
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
enum DeviceStartMode{
|
||||
Stop,
|
||||
Start,
|
||||
StartAutoTune, // 启动升温速率自整定
|
||||
Stop,
|
||||
Start,
|
||||
StartAutoTune, // 启动升温速率自整定
|
||||
StopAutoTune // 停止升温速率自整定
|
||||
};
|
||||
|
||||
typedef struct com_protocol
|
||||
{
|
||||
uint16_t head;
|
||||
uint8_t len;
|
||||
uint8_t cmd;
|
||||
uint16_t addr;
|
||||
uint8_t data_buf[256];
|
||||
uint16_t head;
|
||||
uint8_t len;
|
||||
uint8_t cmd;
|
||||
uint16_t addr;
|
||||
uint8_t data_buf[256];
|
||||
}SerialPortProtocol;
|
||||
|
||||
typedef enum gas_type {
|
||||
NC,
|
||||
N2,
|
||||
O2
|
||||
NC,
|
||||
N2,
|
||||
O2
|
||||
}GasType;
|
||||
|
||||
typedef struct control_data
|
||||
{
|
||||
uint8_t onoff;
|
||||
float cutoff_temp;
|
||||
float temp_flow;
|
||||
uint16_t constant_temp_time_min;
|
||||
enum gas_type gas;
|
||||
uint8_t onoff;
|
||||
float cutoff_temp;
|
||||
float temp_flow;
|
||||
uint16_t constant_temp_time_min;
|
||||
enum gas_type gas;
|
||||
}Phase;
|
||||
|
||||
struct pid_data
|
||||
{
|
||||
float kp;
|
||||
float ki;
|
||||
float kd;
|
||||
float kp;
|
||||
float ki;
|
||||
float kd;
|
||||
};
|
||||
|
||||
typedef struct com_data
|
||||
{
|
||||
uint8_t run_type; //0,运行状态
|
||||
uint8_t current_phase; //1,当前阶段
|
||||
float add_run_time; //2,累计运行时间
|
||||
float add_constan_temp_time; //6,当前阶段恒温时间
|
||||
double sample_temp; //A,样品温度
|
||||
double dsc; //12,热流
|
||||
double temp_flow; //1a,升温速率
|
||||
float cold_temp; //22,冷端温度
|
||||
uint8_t hardware_err; //26,硬件错误
|
||||
uint8_t current_gas; //27,当前气氛
|
||||
float auto_pid_temp_flow; //28,自整定升温速率
|
||||
uint8_t run_mode; //2c,启动模式
|
||||
uint8_t reserve_buf[35]; //2d-4f,保留
|
||||
struct control_data phase_data[6];//50-97,阶段控制数据
|
||||
uint8_t meas_type; //98,测试类型
|
||||
uint8_t init_gas; //99, 初始气氛
|
||||
struct pid_data temp_flow_pid_low;//9a-a5,升温速率 低pid
|
||||
struct pid_data temp_flow_pid_high;//a6-B1,升温速率 高pid
|
||||
float cold_temp_cali_standard; //B2,冷端标准温度
|
||||
float cold_temp_cali_meas; //B6,冷端测量温度
|
||||
uint8_t cold_cali_flag; //B7,冷端温度计算
|
||||
float cold_temp_slope; //B8,冷端温度倍率
|
||||
float sample_temp_calilow_standard;//BC,样品标准温度低倍率
|
||||
float sample_temp_calilow_meas; //C0,样品测量温度低倍率
|
||||
uint8_t sample_temp_cali_low_flag;//C4,样品温度计算低倍率
|
||||
float sample_temp_slope_low; //C5,样品温度低倍率低倍率
|
||||
float sample_temp_calimid_standard;//C9,样品标准温度中倍率
|
||||
float sample_temp_calimid_meas; //CD,样品测量温度中倍率
|
||||
uint8_t sample_temp_cali_mid_flag;//D1,样品温度计算中倍率
|
||||
float sample_temp_slope_middle; //D2,样品温度中倍率
|
||||
float sample_temp_calihigh_standard;//D6,样品标准温度高倍率
|
||||
float sample_temp_calihigh_meas; //样品测量温度高倍率
|
||||
uint8_t sample_temp_cali_high_flag; //样品温度计算高倍率
|
||||
float sample_temp_slope_high; //样品温度高倍率
|
||||
float enthalpy_equation_a; //热焓方程式系数a
|
||||
float enthalpy_equation_b; //热焓方程式系数b
|
||||
float enthalpy_equation_c; //热焓方程式系数c
|
||||
uint8_t run_type; //0,运行状态
|
||||
uint8_t current_phase; //1,当前阶段
|
||||
float add_run_time; //2,累计运行时间
|
||||
float add_constan_temp_time; //6,当前阶段恒温时间
|
||||
double sample_temp; //A,样品温度
|
||||
double dsc; //12,热流
|
||||
double temp_flow; //1a,升温速率
|
||||
float cold_temp; //22,冷端温度
|
||||
uint8_t hardware_err; //26,硬件错误
|
||||
uint8_t current_gas; //27,当前气氛
|
||||
float auto_pid_temp_flow; //28,自整定升温速率
|
||||
uint8_t run_mode; //2c,启动模式
|
||||
uint8_t reserve_buf[35]; //2d-4f,保留
|
||||
struct control_data phase_data[6];//50-97,阶段控制数据
|
||||
uint8_t meas_type; //98,测试类型
|
||||
uint8_t init_gas; //99, 初始气氛
|
||||
struct pid_data temp_flow_pid_low;//9a-a5,升温速率 低pid
|
||||
struct pid_data temp_flow_pid_high;//a6-B1,升温速率 高pid
|
||||
float cold_temp_cali_standard; //B2,冷端标准温度
|
||||
float cold_temp_cali_meas; //B6,冷端测量温度
|
||||
uint8_t cold_cali_flag; //B7,冷端温度计算
|
||||
float cold_temp_slope; //B8,冷端温度倍率
|
||||
float sample_temp_calilow_standard;//BC,样品标准温度低倍率
|
||||
float sample_temp_calilow_meas; //C0,样品测量温度低倍率
|
||||
uint8_t sample_temp_cali_low_flag;//C4,样品温度计算低倍率
|
||||
float sample_temp_slope_low; //C5,样品温度低倍率低倍率
|
||||
float sample_temp_calimid_standard;//C9,样品标准温度中倍率
|
||||
float sample_temp_calimid_meas; //CD,样品测量温度中倍率
|
||||
uint8_t sample_temp_cali_mid_flag;//D1,样品温度计算中倍率
|
||||
float sample_temp_slope_middle; //D2,样品温度中倍率
|
||||
float sample_temp_calihigh_standard;//D6,样品标准温度高倍率
|
||||
float sample_temp_calihigh_meas; //样品测量温度高倍率
|
||||
uint8_t sample_temp_cali_high_flag; //样品温度计算高倍率
|
||||
float sample_temp_slope_high; //样品温度高倍率
|
||||
float enthalpy_equation_a; //热焓方程式系数a
|
||||
float enthalpy_equation_b; //热焓方程式系数b
|
||||
float enthalpy_equation_c; //热焓方程式系数c
|
||||
} CommonData;
|
||||
|
||||
#pragma pack(pop)
|
||||
@ -94,7 +95,7 @@ typedef struct com_data
|
||||
#if 0
|
||||
struct com_device
|
||||
{
|
||||
struct temp_control* temp;
|
||||
struct temp_control* temp;
|
||||
};
|
||||
struct com_data* com_data_get(void);
|
||||
void com_protocol_init(struct com_device* dev);
|
||||
|
@ -121,11 +121,20 @@ void SerialPort::slotReadData()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Global::Mode::ExperimentStart == Global::instance()->getMode())
|
||||
// read data
|
||||
if (spp->addr == 0)
|
||||
{
|
||||
emit sigSendCommonData(cd);
|
||||
|
||||
if (Global::Mode::ExperimentStart == Global::instance()->getMode())
|
||||
{
|
||||
emit sigSendCommonData(cd);
|
||||
}
|
||||
emit sigSendCommonDataToRealDataForm(cd);
|
||||
}
|
||||
else if(spp->addr == PHASE_START_ADDR)
|
||||
{
|
||||
emit sigSendPhaseInfo(ba);
|
||||
}
|
||||
emit sigSendCommonDataToRealDataForm(cd);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -137,14 +146,15 @@ void SerialPort::writeCmdHandle(const int dataLength, const u16 addr,
|
||||
int localAddr = addr;
|
||||
|
||||
int phaseByteSize = sizeof(Phase);
|
||||
auto phaseParserFunc = [&](const int index){
|
||||
auto phaseParserFunc = [&](const int index)
|
||||
{
|
||||
Phase phase;
|
||||
phase.onoff = 1;
|
||||
phase.gas = cd.phase_data[index].gas;
|
||||
phase.gas = cd.phase_data[index].gas;
|
||||
phase.temp_flow = cd.phase_data[index].temp_flow;
|
||||
phase.cutoff_temp = cd.phase_data[index].cutoff_temp;
|
||||
phase.cutoff_temp = cd.phase_data[index].cutoff_temp;
|
||||
phase.constant_temp_time_min =
|
||||
cd.phase_data[index].constant_temp_time_min;
|
||||
cd.phase_data[index].constant_temp_time_min;
|
||||
|
||||
localLength -= phaseByteSize;
|
||||
localAddr += phaseByteSize;
|
||||
@ -154,12 +164,12 @@ void SerialPort::writeCmdHandle(const int dataLength, const u16 addr,
|
||||
{
|
||||
switch (localAddr)
|
||||
{
|
||||
case offsetof(CommonData, current_gas): //当前气氛
|
||||
case offsetof(CommonData, current_gas): // 当前气氛
|
||||
// gas_type_set(dev->temp, msg_data.current_gas);
|
||||
localAddr += 1;
|
||||
localLength -= 1;
|
||||
break;
|
||||
case offsetof(CommonData, auto_pid_temp_flow): //自整定升温速率
|
||||
case offsetof(CommonData, auto_pid_temp_flow): // 自整定升温速率
|
||||
localAddr += 4;
|
||||
localLength -= 4;
|
||||
break;
|
||||
@ -185,18 +195,25 @@ void SerialPort::writeCmdHandle(const int dataLength, const u16 addr,
|
||||
break;
|
||||
}
|
||||
case offsetof(CommonData, phase_data[0].onoff):
|
||||
phaseParserFunc(0); break;
|
||||
phaseParserFunc(0);
|
||||
break;
|
||||
case offsetof(CommonData, phase_data[1].onoff):
|
||||
phaseParserFunc(1); break;
|
||||
phaseParserFunc(1);
|
||||
break;
|
||||
case offsetof(CommonData, phase_data[2].onoff):
|
||||
phaseParserFunc(2); break;
|
||||
phaseParserFunc(2);
|
||||
break;
|
||||
case offsetof(CommonData, phase_data[3].onoff):
|
||||
phaseParserFunc(3); break;
|
||||
phaseParserFunc(3);
|
||||
break;
|
||||
case offsetof(CommonData, phase_data[4].onoff):
|
||||
phaseParserFunc(4); break;
|
||||
phaseParserFunc(4);
|
||||
break;
|
||||
case offsetof(CommonData, phase_data[5].onoff):
|
||||
phaseParserFunc(5); break;
|
||||
default:break;
|
||||
phaseParserFunc(5);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -407,7 +424,8 @@ void SerialPort::slotSendData(const QByteArray &ba)
|
||||
* 写入的数据有
|
||||
* 1、阶段设置。
|
||||
*/
|
||||
if(WRITE_CMD == ba.at(3)){
|
||||
if (WRITE_CMD == ba.at(3))
|
||||
{
|
||||
_lastWriteBa = ba;
|
||||
}
|
||||
qDebug() << "slotSendData:" << ba.size();
|
||||
@ -419,7 +437,6 @@ void SerialPort::slotSendData(const QByteArray &ba)
|
||||
else
|
||||
{
|
||||
qDebug() << "sp not open.";
|
||||
// qErrnoWarning("sp not open.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -8,11 +8,12 @@
|
||||
#include "defines.h"
|
||||
#include "protocol.h"
|
||||
|
||||
class SerialPort:public QObject
|
||||
class SerialPort : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum E_CMD_TYPE{
|
||||
enum E_CMD_TYPE
|
||||
{
|
||||
e_zero,
|
||||
e_forward,
|
||||
e_back
|
||||
@ -21,27 +22,35 @@ public:
|
||||
static SerialPort *instance();
|
||||
~SerialPort();
|
||||
|
||||
void sendData(const QByteArray &data)
|
||||
{
|
||||
slotSendData(data);
|
||||
}
|
||||
void sendCmd(const E_CMD_TYPE e);
|
||||
static void parserTest();
|
||||
bool openSp();
|
||||
public slots:
|
||||
void slotDeliverData(const QByteArray&);
|
||||
// void slotConnectToDevice(const QByteArray&);
|
||||
void slotSendData(const QByteArray&);
|
||||
void slotCloseSp();
|
||||
signals:
|
||||
void sigSendCommonData(const CommonData&);
|
||||
void sigSendCommonDataToRealDataForm(const CommonData&);
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *event);
|
||||
signals:
|
||||
void sigSendCommonData(const CommonData &);
|
||||
void sigSendCommonDataToRealDataForm(const CommonData &);
|
||||
void sigSendPhaseInfo(const QByteArray &);
|
||||
public slots:
|
||||
void slotDeliverData(const QByteArray &);
|
||||
// void slotConnectToDevice(const QByteArray&);
|
||||
void slotSendData(const QByteArray &);
|
||||
void slotCloseSp();
|
||||
private slots:
|
||||
void slotReadData();
|
||||
|
||||
private:
|
||||
void writeCmdHandle(const int dataLength,const u16 addr,const CommonData&cd);
|
||||
void to_hex(char* in_char, int char_length, char* out_char);
|
||||
void writeCmdHandle(const int dataLength, const u16 addr, const CommonData &cd);
|
||||
void to_hex(char *in_char, int char_length, char *out_char);
|
||||
void displayPortInfo();
|
||||
|
||||
private:
|
||||
SerialPort(QObject* parent=nullptr);
|
||||
SerialPort(QObject *parent = nullptr);
|
||||
QSerialPort *_sp;
|
||||
QByteArray _lastWriteBa;
|
||||
};
|
||||
|
@ -1,12 +0,0 @@
|
||||
#include "qt_new_proj.h"
|
||||
|
||||
#include <QApplication>
|
||||
#pragma comment(lib, "user32.lib")
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
qt_new_proj w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#include "qt_new_proj.h"
|
||||
|
||||
qt_new_proj::qt_new_proj(QWidget* parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui_qt_new_proj)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
qt_new_proj::~qt_new_proj()
|
||||
{
|
||||
delete ui;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
#include "ui_qt_new_proj.h"
|
||||
#include <QMainWindow>
|
||||
|
||||
class qt_new_proj : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
qt_new_proj(QWidget* parent = nullptr);
|
||||
~qt_new_proj();
|
||||
|
||||
private:
|
||||
Ui_qt_new_proj* ui;
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>qt_new_proj</class>
|
||||
<widget class="QMainWindow" name="qt_new_proj">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>qt_new_proj</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar"/>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -8,24 +8,27 @@
|
||||
#include "global.h"
|
||||
#include "filemanager.h"
|
||||
|
||||
ExperimentSettingForm::ExperimentSettingForm(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ExperimentSettingForm)
|
||||
ExperimentSettingForm::ExperimentSettingForm(QWidget *parent) : QWidget(parent),
|
||||
ui(new Ui::ExperimentSettingForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
uiReset();
|
||||
|
||||
connect(ui->checkBox_phase_2,&QCheckBox::clicked,
|
||||
this,&ExperimentSettingForm::slotPhase2StateChanged);
|
||||
connect(ui->checkBox_phase_3,&QCheckBox::clicked,
|
||||
this,&ExperimentSettingForm::slotPhase3StateChanged);
|
||||
connect(ui->checkBox_phase_4,&QCheckBox::clicked,
|
||||
this,&ExperimentSettingForm::slotPhase4StateChanged);
|
||||
connect(ui->checkBox_phase_2, &QCheckBox::clicked,
|
||||
this, &ExperimentSettingForm::slotPhase2StateChanged);
|
||||
connect(ui->checkBox_phase_3, &QCheckBox::clicked,
|
||||
this, &ExperimentSettingForm::slotPhase3StateChanged);
|
||||
connect(ui->checkBox_phase_4, &QCheckBox::clicked,
|
||||
this, &ExperimentSettingForm::slotPhase4StateChanged);
|
||||
connect(ui->checkBox_phase_5, &QCheckBox::clicked,
|
||||
this, &ExperimentSettingForm::slotPhase5StateChanged);
|
||||
connect(ui->checkBox_phase_6, &QCheckBox::clicked,
|
||||
this, &ExperimentSettingForm::slotPhase6StateChanged);
|
||||
|
||||
// connect(ui->pushButton_connect_to_device,&QPushButton::clicked,
|
||||
// this,&ExperimentSettingForm::slotConnectToDevice);
|
||||
connect(ui->pushButton_cancel,&QPushButton::clicked,
|
||||
this,&ExperimentSettingForm::slotCancel);
|
||||
connect(ui->pushButton_cancel, &QPushButton::clicked,
|
||||
this, &ExperimentSettingForm::slotCancel);
|
||||
}
|
||||
|
||||
ExperimentSettingForm::~ExperimentSettingForm()
|
||||
@ -35,7 +38,7 @@ ExperimentSettingForm::~ExperimentSettingForm()
|
||||
|
||||
void ExperimentSettingForm::uiReset()
|
||||
{
|
||||
//init data and status.
|
||||
// init data and status.
|
||||
ui->checkBox_phase_1->setChecked(true);
|
||||
ui->checkBox_phase_1->setEnabled(false);
|
||||
|
||||
@ -43,52 +46,89 @@ void ExperimentSettingForm::uiReset()
|
||||
ui->phase_2_cutoff_temp->setText("0");
|
||||
ui->phase_3_cutoff_temp->setText("0");
|
||||
ui->phase_4_cutoff_temp->setText("0");
|
||||
ui->phase_5_cutoff_temp->setText("0");
|
||||
ui->phase_6_cutoff_temp->setText("0");
|
||||
|
||||
ui->phase_1_scan_rate->setText("0");
|
||||
ui->phase_2_scan_rate->setText("0");
|
||||
ui->phase_3_scan_rate->setText("0");
|
||||
ui->phase_4_scan_rate->setText("0");
|
||||
ui->phase_5_scan_rate->setText("0");
|
||||
ui->phase_6_scan_rate->setText("0");
|
||||
|
||||
ui->phase_1_constant_temp->setText("0");
|
||||
ui->phase_2_constant_temp->setText("0");
|
||||
ui->phase_3_constant_temp->setText("0");
|
||||
ui->phase_4_constant_temp->setText("0");
|
||||
ui->phase_5_constant_temp->setText("0");
|
||||
ui->phase_6_constant_temp->setText("0");
|
||||
|
||||
ui->phase_2_cutoff_temp->setEnabled(false);
|
||||
ui->phase_3_cutoff_temp->setEnabled(false);
|
||||
ui->phase_4_cutoff_temp->setEnabled(false);
|
||||
ui->phase_5_cutoff_temp->setEnabled(false);
|
||||
ui->phase_6_cutoff_temp->setEnabled(false);
|
||||
|
||||
ui->phase_2_scan_rate->setEnabled(false);
|
||||
ui->phase_3_scan_rate->setEnabled(false);
|
||||
ui->phase_4_scan_rate->setEnabled(false);
|
||||
ui->phase_5_scan_rate->setEnabled(false);
|
||||
ui->phase_6_scan_rate->setEnabled(false);
|
||||
|
||||
ui->phase_2_constant_temp->setEnabled(false);
|
||||
ui->phase_3_constant_temp->setEnabled(false);
|
||||
ui->phase_4_constant_temp->setEnabled(false);
|
||||
ui->phase_5_constant_temp->setEnabled(false);
|
||||
ui->phase_6_constant_temp->setEnabled(false);
|
||||
|
||||
ui->comboBox_phase_2_atmosphere->setEnabled(false);
|
||||
ui->comboBox_phase_3_atmosphere->setEnabled(false);
|
||||
ui->comboBox_phase_4_atmosphere->setEnabled(false);
|
||||
ui->comboBox_phase_5_atmosphere->setEnabled(false);
|
||||
ui->comboBox_phase_6_atmosphere->setEnabled(false);
|
||||
|
||||
ui->radioButton_OIT_not->setChecked(true);
|
||||
|
||||
ui->checkBox_phase_2->setTristate(false);
|
||||
ui->checkBox_phase_3->setTristate(false);
|
||||
ui->checkBox_phase_4->setTristate(false);
|
||||
ui->checkBox_phase_5->setTristate(false);
|
||||
ui->checkBox_phase_6->setTristate(false);
|
||||
}
|
||||
void ExperimentSettingForm::uiUpdatePhase(QVector<Phase> &vtr)
|
||||
{
|
||||
for(int i = 0; i< vtr.size(); i++){
|
||||
const Phase &phase = vtr[i];
|
||||
if(phase.onoff == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
QString checkBoxName = QString("checkBox_phase_%1").arg(i);
|
||||
QCheckBox *checkBox = ui->findChild<QCheckBox*>(checkBoxName);
|
||||
if (checkBox) {
|
||||
checkBox->setTristate(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
void ExperimentSettingForm::slotPhase2StateChanged(int state)
|
||||
{
|
||||
qDebug()<<"slotPhase2StateChanged:"<<state;
|
||||
qDebug() << "slotPhase2StateChanged:" << state;
|
||||
|
||||
if(state == Qt::PartiallyChecked){
|
||||
if (state == Qt::PartiallyChecked)
|
||||
{
|
||||
ui->phase_2_cutoff_temp->setEnabled(true);
|
||||
ui->phase_2_scan_rate->setEnabled(true);
|
||||
ui->phase_2_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_2_atmosphere->setEnabled(true);
|
||||
}else{
|
||||
if(ui->checkBox_phase_3->isChecked()){
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ui->checkBox_phase_3->isChecked())
|
||||
{
|
||||
ui->checkBox_phase_2->setCheckState(Qt::Checked);
|
||||
}else {
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_2_cutoff_temp->setEnabled(false);
|
||||
ui->phase_2_scan_rate->setEnabled(false);
|
||||
ui->phase_2_constant_temp->setEnabled(false);
|
||||
@ -99,19 +139,28 @@ void ExperimentSettingForm::slotPhase2StateChanged(int state)
|
||||
|
||||
void ExperimentSettingForm::slotPhase3StateChanged(int state)
|
||||
{
|
||||
if(state == Qt::PartiallyChecked){
|
||||
if(ui->checkBox_phase_2->isChecked()){
|
||||
if (state == Qt::PartiallyChecked)
|
||||
{
|
||||
if (ui->checkBox_phase_2->isChecked())
|
||||
{
|
||||
ui->phase_3_cutoff_temp->setEnabled(true);
|
||||
ui->phase_3_scan_rate->setEnabled(true);
|
||||
ui->phase_3_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_3_atmosphere->setEnabled(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->checkBox_phase_3->setChecked(false);
|
||||
}
|
||||
}else{
|
||||
if(ui->checkBox_phase_4->isChecked()){
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ui->checkBox_phase_4->isChecked())
|
||||
{
|
||||
ui->checkBox_phase_3->setChecked(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_3_cutoff_temp->setEnabled(false);
|
||||
ui->phase_3_scan_rate->setEnabled(false);
|
||||
ui->phase_3_constant_temp->setEnabled(false);
|
||||
@ -122,16 +171,22 @@ void ExperimentSettingForm::slotPhase3StateChanged(int state)
|
||||
|
||||
void ExperimentSettingForm::slotPhase4StateChanged(int state)
|
||||
{
|
||||
if(state == Qt::PartiallyChecked){
|
||||
if(ui->checkBox_phase_3->isChecked()){
|
||||
if (state == Qt::PartiallyChecked)
|
||||
{
|
||||
if (ui->checkBox_phase_3->isChecked())
|
||||
{
|
||||
ui->phase_4_cutoff_temp->setEnabled(true);
|
||||
ui->phase_4_scan_rate->setEnabled(true);
|
||||
ui->phase_4_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_4_atmosphere->setEnabled(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->checkBox_phase_4->setChecked(false);
|
||||
}
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_4_cutoff_temp->setEnabled(false);
|
||||
ui->phase_4_scan_rate->setEnabled(false);
|
||||
ui->phase_4_constant_temp->setEnabled(false);
|
||||
@ -139,10 +194,61 @@ void ExperimentSettingForm::slotPhase4StateChanged(int state)
|
||||
}
|
||||
}
|
||||
|
||||
void ExperimentSettingForm::slotPhase5StateChanged(int state)
|
||||
{
|
||||
if (state == Qt::PartiallyChecked)
|
||||
{
|
||||
if (ui->checkBox_phase_4->isChecked())
|
||||
{
|
||||
ui->phase_5_cutoff_temp->setEnabled(true);
|
||||
ui->phase_5_scan_rate->setEnabled(true);
|
||||
ui->phase_5_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_5_atmosphere->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->checkBox_phase_5->setChecked(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_5_cutoff_temp->setEnabled(false);
|
||||
ui->phase_5_scan_rate->setEnabled(false);
|
||||
ui->phase_5_constant_temp->setEnabled(false);
|
||||
ui->comboBox_phase_5_atmosphere->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ExperimentSettingForm::slotPhase6StateChanged(int state)
|
||||
{
|
||||
if (state == Qt::PartiallyChecked)
|
||||
{
|
||||
if (ui->checkBox_phase_5->isChecked())
|
||||
{
|
||||
ui->phase_6_cutoff_temp->setEnabled(true);
|
||||
ui->phase_6_scan_rate->setEnabled(true);
|
||||
ui->phase_6_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_6_atmosphere->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->checkBox_phase_6->setChecked(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_6_cutoff_temp->setEnabled(false);
|
||||
ui->phase_6_scan_rate->setEnabled(false);
|
||||
ui->phase_6_constant_temp->setEnabled(false);
|
||||
ui->comboBox_phase_6_atmosphere->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ExperimentSettingForm::slotConnectToDevice()
|
||||
{
|
||||
QVector<Phase> phaseVtr;
|
||||
if(ui->checkBox_phase_1->checkState()){
|
||||
if (ui->checkBox_phase_1->checkState())
|
||||
{
|
||||
Phase phase;
|
||||
phase.onoff = 1;
|
||||
phase.cutoff_temp = ui->phase_1_cutoff_temp->text().toFloat();
|
||||
@ -153,7 +259,8 @@ void ExperimentSettingForm::slotConnectToDevice()
|
||||
|
||||
phaseVtr.push_back(phase);
|
||||
}
|
||||
if(ui->checkBox_phase_2->checkState()){
|
||||
if (ui->checkBox_phase_2->checkState())
|
||||
{
|
||||
Phase phase;
|
||||
phase.onoff = 1;
|
||||
phase.cutoff_temp = ui->phase_2_cutoff_temp->text().toFloat();
|
||||
@ -166,7 +273,7 @@ void ExperimentSettingForm::slotConnectToDevice()
|
||||
}
|
||||
|
||||
QByteArray ba = DataParser::connectToDevice(phaseVtr);
|
||||
qDebug()<<"ba size:"<<ba.size();
|
||||
qDebug() << "ba size:" << ba.size();
|
||||
emit sigDeliverData(ba);
|
||||
|
||||
// Global::instance()->setMode(Global::Mode::ConnectedToDev);
|
||||
@ -185,37 +292,51 @@ void ExperimentSettingForm::slotCancel()
|
||||
}
|
||||
void ExperimentSettingForm::slotPhaseCheck()
|
||||
{
|
||||
if(sender() == ui->checkBox_phase_2){
|
||||
if(ui->checkBox_phase_2->isChecked()){
|
||||
if (sender() == ui->checkBox_phase_2)
|
||||
{
|
||||
if (ui->checkBox_phase_2->isChecked())
|
||||
{
|
||||
ui->phase_2_cutoff_temp->setEnabled(true);
|
||||
ui->phase_2_scan_rate->setEnabled(true);
|
||||
ui->phase_2_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_2_atmosphere->setEnabled(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_2_cutoff_temp->setEnabled(false);
|
||||
ui->phase_2_scan_rate->setEnabled(false);
|
||||
ui->phase_2_constant_temp->setEnabled(false);
|
||||
ui->comboBox_phase_2_atmosphere->setEnabled(false);
|
||||
}
|
||||
}else if(sender() == ui->checkBox_phase_3){
|
||||
if(ui->checkBox_phase_3->isChecked()){
|
||||
}
|
||||
else if (sender() == ui->checkBox_phase_3)
|
||||
{
|
||||
if (ui->checkBox_phase_3->isChecked())
|
||||
{
|
||||
ui->phase_3_cutoff_temp->setEnabled(true);
|
||||
ui->phase_3_scan_rate->setEnabled(true);
|
||||
ui->phase_3_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_3_atmosphere->setEnabled(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_3_cutoff_temp->setEnabled(false);
|
||||
ui->phase_3_scan_rate->setEnabled(false);
|
||||
ui->phase_3_constant_temp->setEnabled(false);
|
||||
ui->comboBox_phase_3_atmosphere->setEnabled(false);
|
||||
}
|
||||
}else if(sender() == ui->checkBox_phase_4){
|
||||
if(ui->checkBox_phase_4->isChecked()){
|
||||
}
|
||||
else if (sender() == ui->checkBox_phase_4)
|
||||
{
|
||||
if (ui->checkBox_phase_4->isChecked())
|
||||
{
|
||||
ui->phase_4_cutoff_temp->setEnabled(true);
|
||||
ui->phase_4_scan_rate->setEnabled(true);
|
||||
ui->phase_4_constant_temp->setEnabled(true);
|
||||
ui->comboBox_phase_4_atmosphere->setEnabled(true);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->phase_4_cutoff_temp->setEnabled(false);
|
||||
ui->phase_4_scan_rate->setEnabled(false);
|
||||
ui->phase_4_constant_temp->setEnabled(false);
|
||||
@ -228,8 +349,23 @@ void ExperimentSettingForm::on_pushButton_deliverData_clicked()
|
||||
{
|
||||
slotConnectToDevice();
|
||||
|
||||
FileManager::_expeInfo.sampleName= ui->sampleNameLineEdit->text();
|
||||
FileManager::_expeInfo.sampleWeight = ui->sampleWeightLineEdit->text().toInt(nullptr,16);
|
||||
FileManager::_expeInfo.sampleName = ui->sampleNameLineEdit->text();
|
||||
FileManager::_expeInfo.sampleWeight = ui->sampleWeightLineEdit->text().toInt(nullptr, 16);
|
||||
FileManager::_expeInfo.date = ui->dateTimeLineEdit->text();
|
||||
FileManager::_expeInfo.userName = ui->userLineEdit->text();
|
||||
FileManager::_expeInfo.userName = ui->userLineEdit->text();
|
||||
}
|
||||
|
||||
void ExperimentSettingForm::slotRecvPhaseInfo(const QByteArray &ba)
|
||||
{
|
||||
QByteArray localba = ba;
|
||||
SerialPortProtocol *spp = localba.data();
|
||||
|
||||
u8 *data = spp->data_buf;
|
||||
|
||||
vector<Phase> phaseVtr;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Phase *phase = (Phase *)(data + i * sizeof(Phase));
|
||||
phaseVtr.push_back(*phase);
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,12 @@
|
||||
#define EXPERIMENTSETTINGFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <qvector.h>
|
||||
|
||||
namespace Ui {
|
||||
#include "protocol.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class ExperimentSettingForm;
|
||||
}
|
||||
|
||||
@ -15,22 +19,28 @@ public:
|
||||
explicit ExperimentSettingForm(QWidget *parent = nullptr);
|
||||
~ExperimentSettingForm();
|
||||
|
||||
|
||||
signals:
|
||||
void sigDeliverData(const QByteArray&);
|
||||
void sigDeliverData(const QByteArray &);
|
||||
public slots:
|
||||
void slotRecvPhaseInfo(const QByteArray &);
|
||||
private slots:
|
||||
void on_pushButton_deliverData_clicked();
|
||||
|
||||
private:
|
||||
//ui
|
||||
void uiReset();
|
||||
//slot
|
||||
void uiUpdatePhase(QVector<Phase> &);
|
||||
// slot
|
||||
void slotPhaseCheck();
|
||||
void slotPhase2StateChanged(int state);
|
||||
void slotPhase3StateChanged(int state);
|
||||
void slotPhase4StateChanged(int state);
|
||||
void slotPhase5StateChanged(int state);
|
||||
void slotPhase6StateChanged(int state);
|
||||
|
||||
void slotConnectToDevice();
|
||||
void slotCancel();
|
||||
|
||||
private:
|
||||
Ui::ExperimentSettingForm *ui;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>851</width>
|
||||
<height>338</height>
|
||||
<height>356</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -19,7 +19,7 @@
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>821</width>
|
||||
<height>271</height>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,2">
|
||||
@ -93,263 +93,14 @@
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>491</width>
|
||||
<height>211</height>
|
||||
<height>238</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="1,1,1,1,1,1">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="1,0,0,0,0,0,0,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>阶段</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="phase_1_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>截止温度</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="phase_1_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="phase_1_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>气氛</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>恒温时间</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>扫描速率</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>测试类型:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="phase_2_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="phase_2_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="phase_2_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="phase_3_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="phase_4_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="phase_3_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="phase_4_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLineEdit" name="phase_3_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLineEdit" name="phase_4_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QRadioButton" name="radioButton_OIT">
|
||||
<property name="text">
|
||||
<string>OIT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QRadioButton" name="radioButton_OIT_not">
|
||||
<property name="text">
|
||||
<string>非OIT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<item row="7" column="4">
|
||||
<widget class="QComboBox" name="comboBox_initial_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
@ -368,42 +119,37 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_4_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>N2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>O2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="phase_2_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_3_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>N2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>O2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLineEdit" name="phase_4_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
@ -425,6 +171,82 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="3">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>初始气氛:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="phase_1_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="phase_5_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="phase_4_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>截止温度</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_1_atmosphere">
|
||||
<item>
|
||||
@ -444,13 +266,315 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>初始气氛:</string>
|
||||
<string>阶段</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="phase_3_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="phase_1_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_6_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>N2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>O2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>气氛</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QRadioButton" name="radioButton_OIT_not">
|
||||
<property name="text">
|
||||
<string>非OIT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_4_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>N2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>O2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QRadioButton" name="radioButton_OIT">
|
||||
<property name="text">
|
||||
<string>OIT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="phase_3_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>测试类型:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLineEdit" name="phase_6_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="phase_4_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="phase_1_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="phase_5_scan_rate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLineEdit" name="phase_3_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLineEdit" name="phase_5_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="phase_2_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="phase_2_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>恒温时间</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_3_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>N2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>O2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_phase_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QLineEdit" name="phase_6_constant_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>扫描速率</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QComboBox" name="comboBox_phase_5_atmosphere">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>N2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>O2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="phase_6_cutoff_temp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -463,8 +587,8 @@
|
||||
<widget class="QPushButton" name="pushButton_deliverData">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>471</x>
|
||||
<y>300</y>
|
||||
<x>470</x>
|
||||
<y>320</y>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@ -476,8 +600,8 @@
|
||||
<widget class="QPushButton" name="pushButton_cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>580</x>
|
||||
<y>300</y>
|
||||
<x>579</x>
|
||||
<y>320</y>
|
||||
<width>81</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
Loading…
Reference in New Issue
Block a user