Exemple #1
0
        private void Parse10()
        {
            Logger.Log("D10: move axis n steps");

            char axis  = GCodeParser.ReadChar();
            int  steps = GCodeParser.ParseInt();

            if (steps == -1)
            {
                return;
            }

            switch (axis)
            {
            case 'x':
            case 'X':
                DeviceFactory.Get().MoveRawX(steps);
                break;

            case 'y':
            case 'Y':
                DeviceFactory.Get().MoveRawY(steps);
                break;

            case 'z':
            case 'Z':
                DeviceFactory.Get().MoveRawZ(steps);
                break;
            }
        }
Exemple #2
0
        // __ Helpers _________________________________________________________


        private static void Initialize()
        {
            if (mDev != null)
            {
                return;
            }

            // Lazy initialization, to allow device registration.

            mDev = DeviceFactory.Get();

            if (mDev == null)
            {
                Logger.Error("Device is not initialized. Can't continue.");
            }
        }
Exemple #3
0
        private void Test()
        {
            Device d = DeviceFactory.Get();

            d.MoveAbsoluteLinear(100, 100, 0);
            d.MoveAbsoluteLinear(100, 100, -7);

            //d.MoveRelativeLinear(50, 0, 0);
            //d.MoveRelativeLinear(0, 50, 0);
            //d.MoveRelativeLinear(-50, 0, 0);
            //d.MoveRelativeLinear(0, -50, 0);

            //d.MoveRelativeLinear(0, 0, 7);
            //d.MoveAbsoluteLinear(80, 200, 0);

            //d.MoveRelativeLinear(0, 0, -7);

            //d.MoveRelativeLinear(50, 0, 0);
            //d.MoveRelativeLinear(0, 50, 0);
            //d.MoveRelativeLinear(-50, 0, 0);
            //d.MoveRelativeLinear(0, -50, 0);
        }
Exemple #4
0
        public override void Parse()
        {
            float feedRate = (float)GCodeParser.ParseDouble();

            DeviceFactory.Get().SetFeedRate(feedRate);
        }
Exemple #5
0
        private void Parse1()
        {
            Logger.Log("D1: Reset axis to 0, 0 on current location");

            DeviceFactory.Get().ResetAxis();
        }