Esempio n. 1
0
        public Window()
        {
            InitializeComponent();
            _um6Driver = new Um6Driver("COM1", 115200);
            _um6Driver.Init();
            _servoDriver = new ServoDriver();
            _updateTimer = new System.Timers.Timer(50);
            _updateTimer.Elapsed += _updateTimer_Elapsed;
            _cameraDriver = new CameraDriver(this.Handle.ToInt64());
            _cameraDriver.Init(pictureBox.Handle.ToInt64());
            _cameraDriver.CameraCapture += _cameraDriver_CameraCapture;

            // initialize the service
            //_host = new ServiceHost(typeof(SatService));
            NetTcpBinding binding = new NetTcpBinding();
            binding.MaxReceivedMessageSize = 20000000;
            binding.MaxBufferPoolSize = 20000000;
            binding.MaxBufferSize = 20000000;
            binding.Security.Mode = SecurityMode.None;
            _service = new SatService(_cameraDriver);
            _host = new ServiceHost(_service);
            _host.AddServiceEndpoint(typeof(ISatService),
                                   binding,
                                   "net.tcp://localhost:8000");
            _host.Open();

            _stabPitchServo = 6000;
            _stabYawServo = 6000;
        }
Esempio n. 2
0
 public ControlThread(Um6Driver um6Driver, ServoDriver servoDriver, double pitchStabAngle, double yawStabAngle)
 {
     _um6Driver = um6Driver;
     _servoDriver = servoDriver;
     _pitchStabAngle = pitchStabAngle;
     _yawStabAngle = yawStabAngle;
 }
Esempio n. 3
0
 /**
  * Initializes the sensors drivers
  */
 private void initSensors()
 {
     _um6Driver = new Um6Driver(Constants.SERIAL_PORT_NAME, Constants.SERIAL_PORT_BAUD_RATE);
     _um6Driver.Init();
     _logger.log("Sensors driver successfully initialized");
 }