init
This commit is contained in:
45
device/control/acs/buffercode/ptpcode.cpp
Normal file
45
device/control/acs/buffercode/ptpcode.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user