Exemplo n.º 1
0
 public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message)
 {
     MavLink4Net.Messages.Common.SetActuatorControlTargetMessage tMessage = message as MavLink4Net.Messages.Common.SetActuatorControlTargetMessage;
     writer.Write(tMessage.TimeUsec);
     writer.Write(tMessage.Controls[0]);
     writer.Write(tMessage.Controls[1]);
     writer.Write(tMessage.Controls[2]);
     writer.Write(tMessage.Controls[3]);
     writer.Write(tMessage.Controls[4]);
     writer.Write(tMessage.Controls[5]);
     writer.Write(tMessage.Controls[6]);
     writer.Write(tMessage.Controls[7]);
     writer.Write(tMessage.GroupMlx);
     writer.Write(tMessage.TargetSystem);
     writer.Write(tMessage.TargetComponent);
 }
Exemplo n.º 2
0
 public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader)
 {
     MavLink4Net.Messages.Common.SetActuatorControlTargetMessage message = new MavLink4Net.Messages.Common.SetActuatorControlTargetMessage();
     message.TimeUsec        = reader.ReadUInt64();
     message.Controls[0]     = reader.ReadSingle();
     message.Controls[1]     = reader.ReadSingle();
     message.Controls[2]     = reader.ReadSingle();
     message.Controls[3]     = reader.ReadSingle();
     message.Controls[4]     = reader.ReadSingle();
     message.Controls[5]     = reader.ReadSingle();
     message.Controls[6]     = reader.ReadSingle();
     message.Controls[7]     = reader.ReadSingle();
     message.GroupMlx        = reader.ReadByte();
     message.TargetSystem    = reader.ReadByte();
     message.TargetComponent = reader.ReadByte();
     return(message);
 }