void B9Terminal::on_pushButtonPrintBase_clicked() { ui->lineEditCycleStatus->setText("Moving to Base..."); ui->pushButtonPrintBase->setEnabled(false); ui->pushButtonPrintNext->setEnabled(false); ui->pushButtonPrintFinal->setEnabled(false); resetLastSentCycleSettings(); SetCycleParameters(); int iTimeout = getEstBaseCycleTime(ui->lineEditCurZPosInPU->text().toInt(), ui->lineEditTgtZPU->text().toInt()); pPrinterComm->SendCmd("B"+ui->lineEditTgtZPU->text()); m_pPReleaseCycleTimer->start(iTimeout * 2.0); // Timeout after 200% of estimated time required }
void B9Terminal::on_pushButtonPrintFinal_clicked() { rcProjectorPwr(false); // command projector OFF ui->lineEditCycleStatus->setText("Final Release..."); ui->pushButtonPrintBase->setEnabled(false); ui->pushButtonPrintNext->setEnabled(false); ui->pushButtonPrintFinal->setEnabled(false); SetCycleParameters(); int iTimeout = getEstFinalCycleTime(ui->lineEditCurZPosInPU->text().toInt(), ui->lineEditTgtZPU->text().toInt()); pPrinterComm->SendCmd("F"+ui->lineEditTgtZPU->text()); m_pPReleaseCycleTimer->start(iTimeout * 2.0); // Timeout after 200% of estimated time required }
void B9Terminal::on_pushButtonPrintFinal_clicked() { rcProjectorPwr(false); // 命令投影机关闭 ui->lineEditCycleStatus->setText("Final Release..."); ui->pushButtonPrintBase->setEnabled(false); ui->pushButtonPrintNext->setEnabled(false); ui->pushButtonPrintFinal->setEnabled(false); SetCycleParameters(); int iTimeout = getEstFinalCycleTime(ui->lineEditCurZPosInPU->text().toInt(), ui->lineEditTgtZPU->text().toInt()); pPrinterComm->SendCmd("F"+ui->lineEditTgtZPU->text()); m_pPReleaseCycleTimer->start(iTimeout * 2.0); // 请求后超过预计时间的200%视为超时 }