diff --git a/src/Messages/PoseMsg.cs b/src/Messages/PoseMsg.cs index 1ee0b34..93fd7b9 100644 --- a/src/Messages/PoseMsg.cs +++ b/src/Messages/PoseMsg.cs @@ -14,7 +14,7 @@ namespace RoboidControl { /// /// The length of the message /// - public const byte length = 4 + 4 + 4; + public byte length = 4 + 4 + 4; /// /// The network ID of the thing /// @@ -108,12 +108,12 @@ namespace RoboidControl { if ((this.poseType & Pose_Position) != 0) this.position = LowLevelMessages.ReceiveSpherical(buffer, ref ix); if ((this.poseType & Pose_Orientation) != 0) - //this.orientation = SwingTwist.FromQuat32(LowLevelMessages.ReceiveQuat32(buffer, ref ix)); this.orientation = LowLevelMessages.ReceiveSwingTwist(buffer, ref ix); if ((this.poseType & Pose_LinearVelocity) != 0) - this.linearVelocity = LowLevelMessages.ReceiveSpherical(buffer, ref ix); + this.linearVelocity = LowLevelMessages.ReceiveSpherical(buffer, ref ix); if ((this.poseType & Pose_AngularVelocity) != 0) this.angularVelocity = LowLevelMessages.ReceiveSpherical(buffer, ref ix); + this.length = ix; } /// @copydoc Passer::RoboidControl::IMessage::Serialize @@ -133,7 +133,6 @@ namespace RoboidControl { if ((poseType & Pose_Position) != 0) LowLevelMessages.SendSpherical(buffer, ref ix, this.position); if ((poseType & Pose_Orientation) != 0) - //LowLevelMessages.SendQuat32(buffer, ref ix, this.orientation); LowLevelMessages.SendSwingTwist(buffer, ref ix, this.orientation); if ((poseType & Pose_LinearVelocity) != 0) LowLevelMessages.SendSpherical(buffer, ref ix, this.linearVelocity);