MissionPlanner.CurrentState.Mavlink_Sensors.ConvertValuetoBitmaskOffset C# (CSharp) Method

ConvertValuetoBitmaskOffset() private method

private ConvertValuetoBitmaskOffset ( int input ) : int
input int
return int
            int ConvertValuetoBitmaskOffset(int input)
            {
                int offset = 0;
                for (int a = 0; a < sizeof (int)*8; a++)
                {
                    offset = 1 << a;
                    if (input == offset)
                        return a;
                }
                return 0;
            }