예제 #1
0
파일: CommandWorker.cs 프로젝트: Eggies/SDK
 public CommandWorker(DroneClient droneClient)
 {
     _DroneClient = droneClient;
     _NormalPriorityCommandQueue = new Queue<string>();
     _HighPriorityCommandQueue = new Queue<string>();
     _ConfigCommandList = new Queue<string>();
 }
예제 #2
0
        public ConfigurationPage()
        {
            InitializeComponent();

            _droneClient = DroneClient.Instance;
            this.DataContext = _droneClient;
        }
예제 #3
0
파일: WatchdogWorker.cs 프로젝트: GroM/SDK
 public WatchdogWorker(DroneClient droneClient, WorkerBase[] workers)
 {
     foreach (WorkerBase wb in workers)
     {
         _Workers.Add(wb);
     }
 }
예제 #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();
 }
예제 #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));
 }
예제 #6
0
파일: FlyPage.xaml.cs 프로젝트: GroM/SDK
        public FlyPage()
        {
            InitializeComponent();

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

            this.DataContext = _droneClient;
         }
예제 #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();
        }
예제 #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"));
        }
예제 #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();
        }
예제 #10
0
 public ConfigurationWorker(DroneClient droneClient)
 {
     _DroneClient = droneClient;
 }
예제 #11
0
 public NavDataWorker(DroneClient droneClient)
 {
     _DroneClient = droneClient;
 }