示例#1
0
        public GrblCore(System.Windows.Forms.Control syncroObject)
        {
            SetStatus(MacStatus.Disconnected);

            syncro = syncroObject;
            com    = new System.IO.Ports.SerialPort();

            TX = new Tools.ThreadObject(ThreadTX, 1, true, "Serial TX Thread", null);
            RX = new Tools.ThreadObject(ThreadRX, 1, true, "Serial RX Thread", null);

            file = new GrblFile();
            file.OnFileLoaded += RiseOnFileLoaded;

            mQueue   = new System.Collections.Generic.Queue <GrblCommand>();
            mPending = new System.Collections.Generic.Queue <GrblCommand>();
            mSent    = new System.Collections.Generic.List <IGrblRow>();
            mBuffer  = 0;

            mSentPtr     = mSent;
            mQueuePtr    = mQueue;
            mGrblVersion = null;

            mCurOvFeed = mCurOvRapids = mCurOvSpindle = 100;
            mTarOvFeed = mTarOvRapids = mTarOvSpindle = 100;
        }
示例#2
0
        public GrblCore(System.Windows.Forms.Control syncroObject)
        {
            SetStatus(MacStatus.Disconnected);

            syncro = syncroObject;
            com    = new ComWrapper.UsbSerial();

            TX = new Tools.ThreadObject(ThreadTX, 1, true, "Serial TX Thread", null);
            RX = new Tools.ThreadObject(ThreadRX, 1, true, "Serial RX Thread", null);

            file = new GrblFile(0, 0, 200, 300);              //create a fake range to use with manual movements

            file.OnFileLoaded += RiseOnFileLoaded;

            mQueue   = new System.Collections.Generic.Queue <GrblCommand>();
            mPending = new System.Collections.Generic.Queue <GrblCommand>();
            mSent    = new System.Collections.Generic.List <IGrblRow>();
            mBuffer  = 0;

            mSentPtr     = mSent;
            mQueuePtr    = mQueue;
            mGrblVersion = null;

            mCurOvFeed = mCurOvRapids = mCurOvSpindle = 100;
            mTarOvFeed = mTarOvRapids = mTarOvSpindle = 100;
        }
        public Grblv11Emulator(SendMessage sendFunc)
        {
            SPB       = new GrblCommand.StatePositionBuilder();
            RX        = new Tools.ThreadObject(ManageRX, 0, true, "Emulator RX", null);
            TX        = new Tools.ThreadObject(ManageTX, 0, true, "Emulator TX", null);
            mSendFunc = sendFunc;

            conf = (GrblConf)Tools.Serializer.ObjFromFile(filename);
            if (conf == null)
            {
                conf = new GrblConf(new GrblCore.GrblVersionInfo(1, 1, '#'), new Dictionary <int, decimal> {
                    { 0, 10 }, { 1, 25 }, { 2, 0 }, { 3, 0 }, { 4, 0 }, { 5, 0 }, { 6, 0 }, { 10, 1 }, { 11, 0.010m }, { 12, 0.002m }, { 13, 0 }, { 20, 0 }, { 21, 0 }, { 22, 0 }, { 23, 0 }, { 24, 25.000m }, { 25, 500.000m }, { 26, 250 }, { 27, 1.000m }, { 30, 1000.0m }, { 31, 0.0m }, { 32, 0 }, { 100, 250.000m }, { 101, 250.000m }, { 102, 250.000m }, { 110, 500.000m }, { 111, 500.000m }, { 112, 500.000m }, { 120, 10.000m }, { 121, 10.000m }, { 122, 10.000m }, { 130, 200.000m }, { 131, 200.000m }, { 132, 200.000m }
                });
            }
        }
示例#4
0
 public GrblWebSocketEmulator()
 {
     RX = new Tools.ThreadObject(ManageRX, 0, true, "WebSocket Emulator RX", null);
     TX = new Tools.ThreadObject(ManageTX, 0, true, "WebSocket Emulator TX", null);
 }