private void updateInstrument(HeadingIndicatorInstrumentControl control, DroneData droneData) { control.BeginInvoke((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)); } }); }
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.BeginInvoke((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)); } }); }