I am trying to write a new MCode to insert a move immediately after the current move has finished executing. The MCode is defined as follows :
case 840: // insert move
{
for (size_t axis = 0; axis < numVisibleAxes; ++axis)
{
if (gb.Seen(axisLetters[axis]))
{
const float ipval = gb.GetFValue();
reply.catf("input given is : %.3f \n",(double)ipval);
if (reprap.GetMove().MoveCompleted())
{
//insert this ipval to the be executed
}
}
}
}
break;
where MoveCompleted is defined as :
bool DDARing::MoveCompleted() const noexcept
{
return myDda == getPointer->GetState() == DDA::completed;
}
Is my approach correct? How can I insert the move after the previous move has been completed