예제 #1
0
        void GestureDetection_LeftHandBackForwardsChanged(object sender, HandPositionChangedArgs args)
        {
            switch (args.Position)
            {
            case HandPosition.Center:
                break;

            case HandPosition.Backwards:
                if (_client.NavigationData.State == (NavigationState.Landed | NavigationState.Command))
                {
                    _client.FlatTrim();
                }
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Flat Trim "
                });
                break;

            case HandPosition.Forwards:
                _client.Hover();
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Hover"
                });
                break;
            }
        }
예제 #2
0
        void GestureDetection_RightHandUpDownChanged(object sender, HandPositionChangedArgs args)
        {
            switch (args.Position)
            {
            case HandPosition.Up:
                _client.Progress(FlightMode.Progressive, gaz: 0.25f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Going Up"
                });
                break;

            case HandPosition.Center:
                break;

            case HandPosition.Down:
                _client.Progress(FlightMode.Progressive, gaz: -0.25f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Going Down"
                });
                break;
            }
        }
예제 #3
0
        void GestureDetection_LeftHandUpDownChanged(object sender, HandPositionChangedArgs args)
        {
            switch (args.Position)
            {
            case HandPosition.Up:
                _client.Takeoff();
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Taking Off"
                });
                break;

            case HandPosition.Center:
                break;

            case HandPosition.Down:
                _client.Land();
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Landing"
                });
                break;
            }
        }
예제 #4
0
        void GestureDetection_RightHandLeftRightChanged(object sender, HandPositionChangedArgs args)
        {
            switch (args.Position)
            {
            case HandPosition.Center:
                break;

            case HandPosition.Left:
                _client.Progress(FlightMode.Progressive, roll: -0.05f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Rolling to the Left"
                });
                break;

            case HandPosition.Right:
                _client.Progress(FlightMode.Progressive, roll: 0.05f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Rolling to the Right"
                });
                break;
            }
        }
예제 #5
0
        void GestureDetection_LeftHandLeftRightChanged(object sender, HandPositionChangedArgs args)
        {
            switch (args.Position)
            {
            case HandPosition.Center:
                break;

            case HandPosition.Left:
                _client.Progress(FlightMode.Progressive, yaw: 0.25f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Turning Left"
                });
                break;

            case HandPosition.Right:
                _client.Progress(FlightMode.Progressive, yaw: -0.25f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Turning Right"
                });
                break;
            }
        }
예제 #6
0
        void GestureDetection_RightHandBackForwardsChanged(object sender, HandPositionChangedArgs args)
        {
            switch (args.Position)
            {
            case HandPosition.Center:
                break;

            case HandPosition.Backwards:
                _client.Progress(FlightMode.Progressive, pitch: 0.05f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Moving Backwards"
                });
                break;

            case HandPosition.Forwards:
                _client.Progress(FlightMode.Progressive, pitch: -0.05f);
                DroneCommandChanged(_client, new DroneCommandChangedEventArgs {
                    CommandText = "Moving Forwards"
                });
                break;
            }
        }
예제 #7
0
 void OnLeftHandBackFordwardChanged(object sender, HandPositionChangedArgs args)
 {
     LeftFordwardsButton.IsEnabled = args.Position == HandPosition.Forwards;
     LeftCenter3Button.IsEnabled   = args.Position == HandPosition.Center;
     LeftBackwardsButton.IsEnabled = args.Position == HandPosition.Backwards;
 }
예제 #8
0
 void OnLeftHandLeftRightChanged(object sender, HandPositionChangedArgs args)
 {
     LeftLeftButton.IsEnabled    = args.Position == HandPosition.Left;
     LeftCenter2Button.IsEnabled = args.Position == HandPosition.Center;
     LeftRightButton.IsEnabled   = args.Position == HandPosition.Right;
 }
예제 #9
0
 void OnLeftHandUpDownChanged(object sender, HandPositionChangedArgs args)
 {
     LeftUpButton.IsEnabled      = args.Position == HandPosition.Up;
     LeftCenter1Button.IsEnabled = args.Position == HandPosition.Center;
     LeftDownButton.IsEnabled    = args.Position == HandPosition.Down;
 }
예제 #10
0
 void OnRightHandUpDownChanged(object sender, HandPositionChangedArgs args)
 {
     RightUpButton.IsEnabled      = args.Position == HandPosition.Up;
     RightCenter1Button.IsEnabled = args.Position == HandPosition.Center;
     RightDownButton.IsEnabled    = args.Position == HandPosition.Down;
 }
예제 #11
0
 void OnRightHandUpDownChanged(object sender, HandPositionChangedArgs args)
 {
     RightUpButton.IsEnabled = args.Position == HandPosition.Up;
     RightCenter1Button.IsEnabled = args.Position == HandPosition.Center;
     RightDownButton.IsEnabled = args.Position == HandPosition.Down;
 }
예제 #12
0
 void OnRightHandLeftRightChanged(object sender, HandPositionChangedArgs args)
 {
     RightLeftButton.IsEnabled = args.Position == HandPosition.Left;
     RightCenter2Button.IsEnabled = args.Position == HandPosition.Center;
     RightRightButton.IsEnabled = args.Position == HandPosition.Right;
 }
예제 #13
0
 void OnRightHandBackFordwardChanged(object sender, HandPositionChangedArgs args)
 {
     RightFordwardsButton.IsEnabled = args.Position == HandPosition.Forwards;
     RightCenter3Button.IsEnabled = args.Position == HandPosition.Center;
     RightBackwardsButton.IsEnabled = args.Position == HandPosition.Backwards;
 }
예제 #14
0
 void OnLeftHandUpDownChanged(object sender, HandPositionChangedArgs args)
 {
     LeftUpButton.IsEnabled = args.Position == HandPosition.Up;
     LeftCenter1Button.IsEnabled = args.Position == HandPosition.Center;
     LeftDownButton.IsEnabled = args.Position == HandPosition.Down;
 }