Correct PoseMsg length
This commit is contained in:
parent
690426eb69
commit
d5c301fa86
@ -14,7 +14,7 @@ namespace RoboidControl {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The length of the message
|
/// The length of the message
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const byte length = 4 + 4 + 4;
|
public byte length = 4 + 4 + 4;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The network ID of the thing
|
/// The network ID of the thing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -108,12 +108,12 @@ namespace RoboidControl {
|
|||||||
if ((this.poseType & Pose_Position) != 0)
|
if ((this.poseType & Pose_Position) != 0)
|
||||||
this.position = LowLevelMessages.ReceiveSpherical(buffer, ref ix);
|
this.position = LowLevelMessages.ReceiveSpherical(buffer, ref ix);
|
||||||
if ((this.poseType & Pose_Orientation) != 0)
|
if ((this.poseType & Pose_Orientation) != 0)
|
||||||
//this.orientation = SwingTwist.FromQuat32(LowLevelMessages.ReceiveQuat32(buffer, ref ix));
|
|
||||||
this.orientation = LowLevelMessages.ReceiveSwingTwist(buffer, ref ix);
|
this.orientation = LowLevelMessages.ReceiveSwingTwist(buffer, ref ix);
|
||||||
if ((this.poseType & Pose_LinearVelocity) != 0)
|
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)
|
if ((this.poseType & Pose_AngularVelocity) != 0)
|
||||||
this.angularVelocity = LowLevelMessages.ReceiveSpherical(buffer, ref ix);
|
this.angularVelocity = LowLevelMessages.ReceiveSpherical(buffer, ref ix);
|
||||||
|
this.length = ix;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @copydoc Passer::RoboidControl::IMessage::Serialize
|
/// @copydoc Passer::RoboidControl::IMessage::Serialize
|
||||||
@ -133,7 +133,6 @@ namespace RoboidControl {
|
|||||||
if ((poseType & Pose_Position) != 0)
|
if ((poseType & Pose_Position) != 0)
|
||||||
LowLevelMessages.SendSpherical(buffer, ref ix, this.position);
|
LowLevelMessages.SendSpherical(buffer, ref ix, this.position);
|
||||||
if ((poseType & Pose_Orientation) != 0)
|
if ((poseType & Pose_Orientation) != 0)
|
||||||
//LowLevelMessages.SendQuat32(buffer, ref ix, this.orientation);
|
|
||||||
LowLevelMessages.SendSwingTwist(buffer, ref ix, this.orientation);
|
LowLevelMessages.SendSwingTwist(buffer, ref ix, this.orientation);
|
||||||
if ((poseType & Pose_LinearVelocity) != 0)
|
if ((poseType & Pose_LinearVelocity) != 0)
|
||||||
LowLevelMessages.SendSpherical(buffer, ref ix, this.linearVelocity);
|
LowLevelMessages.SendSpherical(buffer, ref ix, this.linearVelocity);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user