Refactor MQTT callback function names for consistency. Changed MessageCallback and ConnectionCallback to MessageCb and ConnectionCb in mqtt.hpp, mqtt.cpp, and custom_robot.cpp to improve code clarity and maintainability.
This commit is contained in:
@@ -178,8 +178,8 @@ bool CustomRobot::initializeMqtt() {
|
||||
|
||||
mqttClient_ = std::make_unique<MqttClient>(broker, port, clientId);
|
||||
using namespace std::placeholders;
|
||||
mqttClient_->setMessageCallback(std::bind(&CustomRobot::onMqttMessage, this, _1, _2));
|
||||
mqttClient_->setConnectionCallback(std::bind(&CustomRobot::onMqttConnection, this, _1));
|
||||
mqttClient_->setMessageCb(std::bind(&CustomRobot::onMqttMessage, this, _1, _2));
|
||||
mqttClient_->setConnectionCb(std::bind(&CustomRobot::onMqttConnection, this, _1));
|
||||
|
||||
mqttClient_->startMessageProcessor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user