This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#include "ptpcode.h"
PTPCode::PTPCode()
{
}
QString PTPCode::getCode()
{
QString code("\n");
code +=
QString("ENABLE (%1)\n").arg(moveAxis)+
QString("%1 (%2),%3\n").arg(getMoveCMDText()).arg(moveAxis).arg(targetPos)+
"runF = 1\n"
"STOP";
return code;
}
void PTPCode::setMoveType(bool value)
{
moveType = value;
}
QString PTPCode::getMoveCMDText()
{
if(moveType)
{
return ABSMove;
}
else
{
return RMove;
}
}
void PTPCode::setTargetPos(QString value)
{
targetPos = value;
}
void PTPCode::setMoveAxis(QString value)
{
moveAxis = value;
}