Skip to content

Commit 41cba10

Browse files
committed
Misc minor formatting fixes
1 parent 0f5ec67 commit 41cba10

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,22 +319,22 @@ bridge:
319319
mqtt:
320320
qos: # [0] MQTT QoS value
321321
retained: # [false] whether to retain MQTT message
322-
mqtt2ros: # Object specifying which MQTT topics to map to which ROS topics
323-
mqtt_topics: # Array specifying which ROS topics to bridge
322+
mqtt2ros: # Object specifying which MQTT topics to map to which ROS topics
323+
mqtt_topics: # Array specifying which ROS topics to bridge
324324
- {{ mqtt_topic_name }} # The MQTT topic that should be bridged, corresponds to the sub-object in the YAML
325325
{{ mqtt_topic_name }}:
326326
ros_topic: # ROS topic on which corresponding MQTT messages are published
327327
ros_type: # [*empty*] If set, the ROS msg type provided will be used. If empty, the type is automatically deduced via the MQTT message
328328
primitive: # [false] whether to publish as primitive message (if coming from non-ROS MQTT client)
329329
advanced:
330330
mqtt:
331-
qos: # [0] MQTT QoS value
331+
qos: # [0] MQTT QoS value
332332
ros:
333-
queue_size: # [1] ROS publisher queue size
334-
latched: # [false] whether to latch ROS message
333+
queue_size: # [1] ROS publisher queue size
334+
latched: # [false] whether to latch ROS message
335335
qos:
336-
reliability: # [system_default] One of "system_default", "reliable", "best_effort".
337-
durability: # [system_default] One of "system_default", "volatile", "transient_local".
336+
reliability: # [system_default] One of "system_default", "reliable", "best_effort".
337+
durability: # [system_default] One of "system_default", "volatile", "transient_local".
338338
```
339339
340340
## Primitive Messages

mqtt_client/include/mqtt_client/MqttClient.ros2.hpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,7 @@ class MqttClient : public rclcpp::Node,
566566

567567

568568
template <typename T>
569-
bool MqttClient::loadParameter(const std::string& key, T& value)
570-
{
569+
bool MqttClient::loadParameter(const std::string& key, T& value) {
571570
bool found = get_parameter(key, value);
572571
if (found)
573572
RCLCPP_DEBUG(get_logger(), "Retrieved parameter '%s' = '%s'", key.c_str(),
@@ -578,8 +577,7 @@ bool MqttClient::loadParameter(const std::string& key, T& value)
578577

579578
template <typename T>
580579
bool MqttClient::loadParameter(const std::string& key, T& value,
581-
const T& default_value)
582-
{
580+
const T& default_value) {
583581
bool found = get_parameter_or(key, value, default_value);
584582
if (!found)
585583
RCLCPP_WARN(get_logger(), "Parameter '%s' not set, defaulting to '%s'",
@@ -592,8 +590,7 @@ bool MqttClient::loadParameter(const std::string& key, T& value,
592590

593591

594592
template <typename T>
595-
bool MqttClient::loadParameter(const std::string& key, std::vector<T>& value)
596-
{
593+
bool MqttClient::loadParameter(const std::string& key, std::vector<T>& value) {
597594
const bool found = get_parameter(key, value);
598595
if (found)
599596
RCLCPP_WARN(get_logger(), "Retrieved parameter '%s' = '[%s]'", key.c_str(),
@@ -604,8 +601,7 @@ bool MqttClient::loadParameter(const std::string& key, std::vector<T>& value)
604601

605602
template <typename T>
606603
bool MqttClient::loadParameter(const std::string& key, std::vector<T>& value,
607-
const std::vector<T>& default_value)
608-
{
604+
const std::vector<T>& default_value) {
609605
const bool found = get_parameter_or(key, value, default_value);
610606
if (!found)
611607
RCLCPP_WARN(get_logger(), "Parameter '%s' not set, defaulting to '%s'",
@@ -627,8 +623,7 @@ bool MqttClient::loadParameter(const std::string& key, std::vector<T>& value,
627623
*/
628624
template <typename T>
629625
void serializeRosMessage(const T& msg,
630-
rclcpp::SerializedMessage& serialized_msg)
631-
{
626+
rclcpp::SerializedMessage& serialized_msg) {
632627

633628
rclcpp::Serialization<T> serializer;
634629
serializer.serialize_message(&msg, &serialized_msg);
@@ -645,8 +640,7 @@ void serializeRosMessage(const T& msg,
645640
*/
646641
template <typename T>
647642
void deserializeRosMessage(const rclcpp::SerializedMessage& serialized_msg,
648-
T& msg)
649-
{
643+
T& msg) {
650644

651645
rclcpp::Serialization<T> serializer;
652646
serializer.deserialize_message(&serialized_msg, &msg);

0 commit comments

Comments
 (0)