private void updateInstrument(HeadingIndicatorInstrumentControl control, ARDrone.Control.ARDroneControl.DroneData droneData)
 {
     control.Invoke((MethodInvoker) delegate
     {
         // Psi range -180..0..180 but heading indicator require 0..360
         if (droneData.Psi > 0)
         {
             control.SetHeadingIndicatorParameters(Convert.ToInt32(droneData.Psi / 1000));
         }
         else
         {
             control.SetHeadingIndicatorParameters(360 + Convert.ToInt32(droneData.Psi / 1000));
         }
     });
 }
Beispiel #2
0
 private void updateInstrument(HeadingIndicatorInstrumentControl control)
 {
     control.Invoke((MethodInvoker) delegate
     {
         if (_navData != null)
         {
             // Psi range -180..0..180 but heading indicator require 0..360
             //if (droneData.Psi > 0)
             //{
             //    control.SetHeadingIndicatorParameters(Convert.ToInt32(droneData.Psi));
             //}
             //else
             //{
             //    control.SetHeadingIndicatorParameters(360 + Convert.ToInt32(droneData.Psi));
             //}
         }
     });
 }
        private void updateInstrument(HeadingIndicatorInstrumentControl control, DroneData droneData)
        {
            control.Invoke((MethodInvoker)delegate
            {
                // Psi range -180..0..180 but heading indicator require 0..360
                if (droneData.Psi > 0)
                {
                    control.SetHeadingIndicatorParameters(Convert.ToInt32(droneData.Psi));
                }
                else
                {
                    control.SetHeadingIndicatorParameters(360 + Convert.ToInt32(droneData.Psi));
                }

            });
        }