Beispiel #1
0
 private void UpdateXYZ(GrblCommand cmd)
 {
     if (cmd is JogCommand)
     {
         mCurX.Update(cmd.X, cmd.IsAbsoluteCoord, mWcoX);
         mCurY.Update(cmd.Y, cmd.IsAbsoluteCoord, mWcoY);
         mCurZ.Update(cmd.Z, cmd.IsAbsoluteCoord, mWcoZ);
     }
     else if (cmd.IsMovement)
     {
         mCurX.Update(cmd.X, ABS, mWcoX);
         mCurY.Update(cmd.Y, ABS, mWcoY);
         mCurZ.Update(cmd.Z, ABS, mWcoZ);
     }
 }
Beispiel #2
0
            public TimeSpan AnalyzeCommand(GrblCommand cmd, bool compute, GrblConf conf = null)
            {
                bool delete = !cmd.JustBuilt;

                if (!cmd.JustBuilt)
                {
                    cmd.BuildHelper();
                }

                UpdateModalsNB(cmd);

                mCurX.Update(cmd.X, ABS);
                mCurY.Update(cmd.Y, ABS);

                mCurF.Update(cmd.F);
                mCurS.Update(cmd.S);

                TimeSpan rv = compute ? ComputeExecutionTime(cmd, conf) : TimeSpan.Zero;

                if (delete)
                {
                    cmd.DeleteHelper();
                }

                return(rv);
            }