public CommandWorker(DroneClient droneClient) { _DroneClient = droneClient; _NormalPriorityCommandQueue = new Queue<string>(); _HighPriorityCommandQueue = new Queue<string>(); _ConfigCommandList = new Queue<string>(); }
public ConfigurationPage() { InitializeComponent(); _droneClient = DroneClient.Instance; this.DataContext = _droneClient; }
public WatchdogWorker(DroneClient droneClient, WorkerBase[] workers) { foreach (WorkerBase wb in workers) { _Workers.Add(wb); } }
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(); }
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)); }
public FlyPage() { InitializeComponent(); _droneClient = DroneClient.Instance; _droneClient.Messages.CollectionChanged += Messages_CollectionChanged; this.DataContext = _droneClient; }
/// <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(); }
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")); }
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(); }
public ConfigurationWorker(DroneClient droneClient) { _DroneClient = droneClient; }
public NavDataWorker(DroneClient droneClient) { _DroneClient = droneClient; }