private Um6Driver _um6Driver; /** Driver of the sensors */ #endregion Fields #region Constructors /** * Construct the server object : * - hWind : window handle * - pBox : the picture box on which the image must be sent * - printOnBox : true if the server thread must set the picture in the picture box */ public Server(long hWind, PictureBox pBox, bool printOnPbox) { this._hWind = (int)hWind; this._hPbox = (int)pBox.Handle.ToInt64(); this._pBox = pBox; this._printOnPbox = printOnPbox; this._container = new ThreadSafeContainer<Bitmap>(); this._logger = Logger.instance(); this._controller = null; initCameraDriver(); initSensors(); initServos(); initService(); }
/** * Stop the controller thread and set _controller to null */ private void stopController() { if (_controller == null) return; _controller.Stop(); _controller = null; }
/** * Start the controller thread */ private void startController() { if (_controller != null) return; _controller = new ControlThread(_um6Driver, _servoDriver, _service, _um6Driver.Pitch, _um6Driver.Yaw); _controller.Start(); }