更新压力稳定判定算法
This commit is contained in:
+19
-2
@@ -1235,19 +1235,36 @@ void MainWidget::airPushingProcess()
|
||||
|
||||
setRunStatus(tr("等待压力稳定..."));
|
||||
|
||||
// 调用压力检测器,监测压力持续3秒波动范围不超过标定值的+-10%
|
||||
if(m_pressureMonitor->tick((float)sysPara->status.PRESSURE, (float)sysPara->para.pressure)) {
|
||||
reclaimTanOpen();
|
||||
sysPara->status.airPushingDone = 1;
|
||||
sysPara->status.airPushing = 0;
|
||||
sysPara->status.airPushingOnTime = 0;
|
||||
airPushTimer->stop();
|
||||
bool isTimeout = m_pressureMonitor->wasTimeout();
|
||||
float bufCopy[12];
|
||||
memcpy(bufCopy, m_pressureMonitor->buffer(), sizeof(bufCopy));
|
||||
m_pressureMonitor->reset();
|
||||
setRunStatus(tr("喷嘴开启中"));
|
||||
|
||||
LogInfo::setRunStatusText(m_pressureMonitor->wasTimeout()
|
||||
LogInfo::setRunStatusText(isTimeout
|
||||
? "Pressure unstable timeout, fallback open the reclaim tank."
|
||||
: "Pressure has stabled, will open the reclaim tank.");
|
||||
|
||||
QString pressureSet = QString("Pressure buffer: [%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12]")
|
||||
.arg(bufCopy[0], 0, 'f', 1)
|
||||
.arg(bufCopy[1], 0, 'f', 1)
|
||||
.arg(bufCopy[2], 0, 'f', 1)
|
||||
.arg(bufCopy[3], 0, 'f', 1)
|
||||
.arg(bufCopy[4], 0, 'f', 1)
|
||||
.arg(bufCopy[5], 0, 'f', 1)
|
||||
.arg(bufCopy[6], 0, 'f', 1)
|
||||
.arg(bufCopy[7], 0, 'f', 1)
|
||||
.arg(bufCopy[8], 0, 'f', 1)
|
||||
.arg(bufCopy[9], 0, 'f', 1)
|
||||
.arg(bufCopy[10], 0, 'f', 1)
|
||||
.arg(bufCopy[11], 0, 'f', 1);
|
||||
LogInfo::setRunStatusText(pressureSet);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user