Refactor command processing in CustomRobot class. Changed method name from processCommand to processCmd for improved consistency and clarity in MQTT message handling.
This commit is contained in:
@@ -207,7 +207,7 @@ void CustomRobot::onMqttMessage(const std::string& topic, const std::string& pay
|
|||||||
std::string controlTopic = config_.topic_prefix + "/" + config_.topic_cmd;
|
std::string controlTopic = config_.topic_prefix + "/" + config_.topic_cmd;
|
||||||
|
|
||||||
if (topic == controlTopic) {
|
if (topic == controlTopic) {
|
||||||
processCommand(message);
|
processCmd(message);
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
LOG_ERROR("Error processing MQTT message: " + std::string(e.what()));
|
LOG_ERROR("Error processing MQTT message: " + std::string(e.what()));
|
||||||
|
|||||||
Reference in New Issue
Block a user