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:
2025-09-09 11:34:35 +08:00
parent 347240026c
commit b35395e543

View File

@@ -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()));