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 void Configure(ComWrapper.WrapperType wraptype, params object[] conf) { if (wraptype == ComWrapper.WrapperType.UsbSerial && (com == null || com.GetType() != typeof(ComWrapper.UsbSerial))) { com = new ComWrapper.UsbSerial(); } else if (wraptype == ComWrapper.WrapperType.Telnet && (com == null || com.GetType() != typeof(ComWrapper.Telnet))) { com = new ComWrapper.Telnet(); } else if (wraptype == ComWrapper.WrapperType.LaserWebESP8266 && (com == null || com.GetType() != typeof(ComWrapper.LaserWebESP8266))) { com = new ComWrapper.LaserWebESP8266(); } com.Configure(conf); }