M350b版本

This commit is contained in:
xin
2026-01-21 14:44:51 +08:00
parent a76d4b77e9
commit 742b0a1e5a
14 changed files with 92 additions and 45 deletions

View File

@ -292,6 +292,7 @@ void CMainAcqThread::GetCommand(QString Worker, QString Command) {
// 用qDebug打印接收到的命令
qDebug()<<"Received Command - Worker:" << Worker << ", Command:" << Command;
int waitebefore=120;
int waitetime=10;
qDebug()<<"GetCommand Worker:"<<Worker<<" Command:"<<Command;
if (Worker=="WDA") {
@ -319,23 +320,23 @@ void CMainAcqThread::GetCommand(QString Worker, QString Command) {
return;
}
if (arc[1]=="Air") {
// system("sudo gpio write 7 1");
system("sudo gpio write 7 1");
qDebug()<<"Start Gas Motor now";
QThread::sleep(waitetime);
m_ctrlGasSensor.ZeroCalibration_Air();
QThread::sleep(waitetime);
emit SendCommand("GAS", "Finish");
// system("sudo gpio write 7 0");
system("sudo gpio write 7 0");
qDebug()<<"Stop Gas Motor now";
}
else if (arc[1] == "N2") {
// system("sudo gpio write 7 1");
system("sudo gpio write 7 1");
qDebug()<<"Start Gas Motor now";
QThread::sleep(waitetime);
m_ctrlGasSensor.ZeroCalibration_N2();
QThread::sleep(waitetime);
emit SendCommand("GAS", "Finish");
// system("sudo gpio write 7 0");
system("sudo gpio write 7 0");
qDebug()<<"Stop Gas Motor now";
}
else {
@ -363,13 +364,13 @@ void CMainAcqThread::GetCommand(QString Worker, QString Command) {
return;
}
unsigned int uiPPM=arc[2].toUInt();
// system("sudo gpio write 7 1");
system("sudo gpio write 7 1");
qDebug()<<"Start Gas Motor now";
QThread::sleep(waitetime);
QThread::sleep(waitebefore);
m_ctrlGasSensor.SpanCalibration(cChannel,uiPPM);
QThread::sleep(waitetime);
emit SendCommand("GAS", "Finish");
// system("sudo gpio write 7 0");
system("sudo gpio write 7 0");
qDebug()<<"Stop Gas Motor now";