Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        /**
         * Stop the controller thread and set _controller to null
         */
        private void stopController()
        {
            if (_controller == null)
                return;

            _controller.Stop();
            _controller = null;
        }
Exemplo n.º 3
0
        /**
         * Start the controller thread
         */
        private void startController()
        {
            if (_controller != null)
                return;

            _controller = new ControlThread(_um6Driver, _servoDriver, _service, _um6Driver.Pitch, _um6Driver.Yaw);
            _controller.Start();
        }