Esempio n. 1
0
 public CommandWorker(DroneClient droneClient)
 {
     _DroneClient = droneClient;
     _NormalPriorityCommandQueue = new Queue<string>();
     _HighPriorityCommandQueue = new Queue<string>();
     _ConfigCommandList = new Queue<string>();
 }
Esempio n. 2
0
        public ConfigurationPage()
        {
            InitializeComponent();

            _droneClient = DroneClient.Instance;
            this.DataContext = _droneClient;
        }
Esempio n. 3
0
 public WatchdogWorker(DroneClient droneClient, WorkerBase[] workers)
 {
     foreach (WorkerBase wb in workers)
     {
         _Workers.Add(wb);
     }
 }
Esempio n. 4
0
 public FlyPage()
 {
     this.InitializeComponent();
     //if (Application.Current.Resources.ContainsKey("DroneClient"))
     //{
     //    _droneClient = (DroneClient)Application.Current.Resources["DroneClient"];
     //}
     //else
     //{
     //    _droneClient = new DroneClient();
     //}
     _droneClient = DroneClient.Instance;
     //Register joysticks
     if (_droneClient.InputProviders.Count == 0)
     {
         _droneClient.InputProviders.Add(new XBox360JoystickProvider(_droneClient));
         _droneClient.InputProviders.Add(new SoftJoystickProvider(_droneClient, RollPitchJoystick, YawGazJoystick));
     }
     this.DataContext = _droneClient;
     this.DefaultViewModel["Messages"] = _droneClient.Messages;
     _Timer = new DispatcherTimer();
     _Timer.Tick += _Timer_Tick;
     _Timer.Interval = new TimeSpan(0, 0, 0, 0, 500);
     _Timer.Start();
 }
Esempio n. 5
0
 public SoftJoystickProvider(DroneClient droneClient, IJoystickControl rollPitchThumb, IJoystickControl yawGazThumb)
 {
     if (droneClient == null)
         throw new ArgumentNullException("DroneClient");
     _DroneClient = droneClient;
     _RollPitchThumb = rollPitchThumb;
     _YawGazThumb = yawGazThumb;
     _Timer = ThreadPoolTimer.CreatePeriodicTimer(new TimerElapsedHandler(timerElapsedHandler), TimeSpan.FromMilliseconds(1000 / 12));
 }
Esempio n. 6
0
        public FlyPage()
        {
            InitializeComponent();

            _droneClient = DroneClient.Instance;
            _droneClient.Messages.CollectionChanged += Messages_CollectionChanged;

            this.DataContext = _droneClient;
         }
Esempio n. 7
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            if(this._viewModel != null)
            {
                this._viewModel.OnNavigatedTo();
            }

            _droneClient = DroneClient.Instance;

            _timer = new DispatcherTimer();
            _timer.Tick += _Timer_Tick;
            _timer.Interval = new TimeSpan(0, 0, 0, 0, 500);
            _timer.Start();
        }
Esempio n. 8
0
        public FlyPage()
        {
            InitializeComponent();

            _droneClient = DroneClient.Instance;
            this.DataContext = _droneClient;
            _droneClient.Messages.CollectionChanged += Messages_CollectionChanged;

            if (_droneClient.InputProviders.Count == 0)
            {
                _droneClient.InputProviders.Add(new SoftJoystickProvider(_droneClient, RollPitchJoystick, YawGazJoystick));
            }

            mediaElem.SetSource(new ARDroneStreamSource("192.168.1.1"));
        }
Esempio n. 9
0
        public FlyPage()
        {
            this.InitializeComponent();

            _droneClient = DroneClient.Instance;
            this.DataContext = _droneClient;
            this.DefaultViewModel["Messages"] = _droneClient.Messages;

            //Register joysticks
            if (_droneClient.InputProviders.Count == 0)
            {
                _droneClient.InputProviders.Add(new XBox360JoystickProvider(_droneClient));
                _droneClient.InputProviders.Add(new SoftJoystickProvider(_droneClient, RollPitchJoystick, YawGazJoystick));
            }
            
            _Timer = new DispatcherTimer();
            _Timer.Tick += _Timer_Tick;
            _Timer.Interval = new TimeSpan(0, 0, 0, 0, 500);
            _Timer.Start();
        }
Esempio n. 10
0
 public ConfigurationWorker(DroneClient droneClient)
 {
     _DroneClient = droneClient;
 }
Esempio n. 11
0
 public NavDataWorker(DroneClient droneClient)
 {
     _DroneClient = droneClient;
 }