public void UpdateDroneController()
        {
            DroneController.Pitch = GetPitchFromKeyboard();
            DroneController.Roll  = GetRollFromKeyboard();
            DroneController.Gaz   = GetGazFromKeyboard();
            DroneController.Yaw   = GetTurnFromKeyboard();

            if (IsKeyPressed(Keys.TakeOffLand))
            {
                if (DroneController.Flying)
                {
                    DroneController.Land();
                }
                else if (DroneController.Connected)
                {
                    DroneController.TakeOff();
                }
            }

            if (IsKeyPressed(Keys.Emergency) && DroneController.Connected)
            {
                DroneController.Emergency();
            }
        }
 private void Emergency_Click(object sender, RoutedEventArgs e)
 {
     _droneController.Emergency();
 }