Ejemplo n.º 1
0
        private static void UpdateStateUsing(def_ardrone_state_mask_t ardroneState, ref NavigationState state)
        {
            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_FLY_MASK))
            {
                state |= NavigationState.Flying;
            }
            else
            {
                state |= NavigationState.Landed;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_EMERGENCY_MASK))
            {
                state |= NavigationState.Emergency;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_COMMAND_MASK))
            {
                state |= NavigationState.Command;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_CONTROL_MASK))
            {
                state |= NavigationState.Control;
            }
        }
Ejemplo n.º 2
0
        private static void UpdateStateUsing(def_ardrone_state_mask_t ardroneState, ref NavigationState state)
        {
            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_FLY_MASK))
                state |= NavigationState.Flying;
            else
                state |= NavigationState.Landed;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_EMERGENCY_MASK))
                state |= NavigationState.Emergency;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_COMMAND_MASK))
                state |= NavigationState.Command;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_CONTROL_MASK))
                state |= NavigationState.Control;
        }
Ejemplo n.º 3
0
        private static void UpdateStateUsing(def_ardrone_state_mask_t ardroneState, ref NavigationState state)
        {
            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_NAVDATA_BOOTSTRAP))
                state |= NavigationState.Bootstrap;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_FLY_MASK))
                state |= NavigationState.Flying;
            else
                state |= NavigationState.Landed;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_WIND_MASK))
                state |= NavigationState.Wind;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_EMERGENCY_MASK))
                state |= NavigationState.Emergency;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_COMMAND_MASK))
                state |= NavigationState.Command;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_CONTROL_MASK))
                state |= NavigationState.Control;

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_COM_WATCHDOG_MASK))
                state |= NavigationState.Watchdog;
        }
Ejemplo n.º 4
0
        private static void UpdateStateUsing(def_ardrone_state_mask_t ardroneState, ref NavigationState state)
        {
            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_NAVDATA_BOOTSTRAP))
            {
                state |= NavigationState.Bootstrap;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_FLY_MASK))
            {
                state |= NavigationState.Flying;
            }
            else
            {
                state |= NavigationState.Landed;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_WIND_MASK))
            {
                state |= NavigationState.Wind;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_EMERGENCY_MASK))
            {
                state |= NavigationState.Emergency;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_COMMAND_MASK))
            {
                state |= NavigationState.Command;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_CONTROL_MASK))
            {
                state |= NavigationState.Control;
            }

            if (ardroneState.HasFlag(def_ardrone_state_mask_t.ARDRONE_COM_WATCHDOG_MASK))
            {
                state |= NavigationState.Watchdog;
            }
        }