예제 #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;
        }