AHRSInterface.AHRS.synch C# (CSharp) Method

synch() public method

public synch ( ) : bool
return bool
        public bool synch()
        {
            bool complete = true;

            if (!connected)
                return false;

            // First, iterate through the PUpdatePending array to determine which AHRS states need
            // to be updated.
            for (int i = 0; i < UpdatePending.Length; i++)
            {
                if (UpdatePending[i] == true)
                {
                    //DataPending[i] = true;

                    // Call UpdateAHRS to send packet to the AHRS to synchronize data
                    if (!updateAHRS(i))
                    {
                        complete = true;
                        DataPending[i] = false;

                    }
                    complete = true;
                    DataPending[i] = false;
                }
            }

              /*  // Now, iterate through PMeasured array to determing which AHRS states have yet to be measured.
            for (int i = 0; i < Measured.Length; i++ )
            {
                if (!Measured[i])
                {
                    DataPending[i] = true;

                    if (!getAHRSState(i))
                    {
                        complete = false;
                        DataPending[i] = false;
                    }
                }
            }*/
            Invalidate();
            return complete;
        }