Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Runtime/Core/ProBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ public class Msg

#if ROS_V2
/// <summary>
/// Quality od service, like as "qos_profile_system_default" or "qos_profile_sensor_data"
/// Quality of service, like as "qos_profile_system_default" or "qos_profile_sensor_data"
/// </summary>
public Qos q;
#else
/// <summary>
/// Latching flag for the message. If true, the message is a latched version of the previous message.
/// </summary>
public bool l = false;
#endif
/// <summary>
/// Data Compression Level (0-9)
Expand Down Expand Up @@ -100,6 +105,8 @@ public void SendMsg(PushSocket pushSocket, Msg msg)
{ "n", msg.n },
#if ROS_V2
{ "q", msg.q.GetValue() },
#else
{ "l", msg.l },
#endif
{ "c", msg.c }
};
Expand Down Expand Up @@ -206,6 +213,8 @@ private Msg DeserializeMessage(byte[] headerBytes)
msg.n = (string)messageData["n"];
#if ROS_V2
msg.q = new Qos(messageData["q"]);
#else
msg.l = (bool)messageData["l"];
#endif
msg.c = (int)tmpC;

Expand Down
2 changes: 2 additions & 0 deletions Runtime/Tx/Tf/TfSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ protected void SendMsg(bool staticT = false)
c = compressionLevel,
#if ROS_V2
q = staticT ? __staticQos : __dynamicQos,
#else
l = staticT,
#endif
d = data
};
Expand Down