Exemplo n.º 1
0
        public byte[] Serialize()
        {
            BitConverter.ToBytes(ref _buffer, 0, _currentTime);
            BitConverter.ToBytes(ref _buffer, 8, _gyroAxes.Pitch);
            BitConverter.ToBytes(ref _buffer, 12, _gyroAxes.Roll);
            BitConverter.ToBytes(ref _buffer, 16, _gyroAxes.Yaw);

            BitConverter.ToBytes(ref _buffer, 20, _radioAxes.Pitch);
            BitConverter.ToBytes(ref _buffer, 24, _radioAxes.Roll);
            BitConverter.ToBytes(ref _buffer, 28, _radioAxes.Yaw);

            BitConverter.ToBytes(ref _buffer, 32, _pidAxes.Pitch);
            BitConverter.ToBytes(ref _buffer, 36, _pidAxes.Roll);
            BitConverter.ToBytes(ref _buffer, 40, _pidAxes.Yaw);

            return(_buffer);
        }