Beispiel #1
0
void B9Terminal::rcFinishPrint(double dDeltaMM)
{
    // Calculates final position based on current + dDeltaMM
    int newPos = dDeltaMM*100000.0/(double)pPrinterComm->getPU();
    newPos += ui->lineEditCurZPosInPU->text().toInt();
    if(newPos>ui->lineEditUpperZLimPU->text().toInt())newPos = ui->lineEditUpperZLimPU->text().toInt();
    setTgtAltitudePU(newPos);
    on_pushButtonPrintFinal_clicked();
}
void B9Terminal::rcFinishPrint(double dDeltaMM)
{
    // 计算基于当前+ dDeltaMM最终位置
    int newPos = dDeltaMM*100000.0/(double)pPrinterComm->getPU();
    newPos += ui->lineEditCurZPosInPU->text().toInt();
    int curPos = ui->lineEditCurZPosInPU->text().toInt();
    int upperLim = ui->lineEditUpperZLimPU->text().toInt();

    if(curPos >= upperLim)
        newPos = curPos;
    else if(newPos > upperLim)
        newPos = upperLim;

    setTgtAltitudePU(newPos);
    on_pushButtonPrintFinal_clicked();
}