From 6fe07ac73c44a37b3059bcc231d5043c3d3da117 Mon Sep 17 00:00:00 2001 From: Sucan126 <632190820@qq.com> Date: Tue, 23 Sep 2025 10:36:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor(custom=5Frobot):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=B8=8Elow=5Fcontroller=E7=9B=B8=E5=85=B3=E7=9A=84=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理不再使用的low_controller相关代码注释,保持代码整洁 --- include/recharge.hpp | 0 src/custom_robot.cpp | 6 ------ src/recharge.cpp | 0 3 files changed, 6 deletions(-) create mode 100644 include/recharge.hpp create mode 100644 src/recharge.cpp diff --git a/include/recharge.hpp b/include/recharge.hpp new file mode 100644 index 0000000..e69de29 diff --git a/src/custom_robot.cpp b/src/custom_robot.cpp index 5ab545d..6617072 100644 --- a/src/custom_robot.cpp +++ b/src/custom_robot.cpp @@ -43,7 +43,6 @@ CustomRobot::~CustomRobot() { controller_.reset(); } - // 屏蔽与low_controller_相关的代码 // low_controller_ = std::make_unique(); // low_controller_->initialize(); @@ -70,7 +69,6 @@ bool CustomRobot::initialize() { controller_ = std::make_unique(); controller_->initialize(); - // 屏蔽与low_controller_相关的代码 // low_controller_ = std::make_unique(); // low_controller_->initialize(); @@ -124,7 +122,6 @@ bool CustomRobot::start() { return false; } - // 屏蔽与low_controller_相关的代码 // if (!low_controller_->start()) { // LOG_ERROR("Failed to start low-level controller"); // return false; @@ -296,7 +293,6 @@ void CustomRobot::processCmd(const nlohmann::json& message) { bool CustomRobot::processLowCmd(const std::string& cmd, const nlohmann::json& message) { - // 屏蔽与low_controller_相关的代码 // if (!low_controller_) // { // LOG_ERROR("LowController not initialized"); @@ -333,7 +329,6 @@ bool CustomRobot::processLowCmd(const std::string& cmd, const nlohmann::json& me // return false; // } - // 临时返回false,直到重新实现功能 LOG_WARN("LowController functionality is currently disabled"); return false; } @@ -678,7 +673,6 @@ bool CustomRobot::processSportCmd(const std::string& cmd, const nlohmann::json& std::string CustomRobot::generateRandomClientId() const { std::string baseId = config_.mqtt_client_id; - // 确保base ID只包含ASCII字符 std::string safeBaseId; for (char c : baseId) { if (std::isalnum(c) || c == '_' || c == '-') { diff --git a/src/recharge.cpp b/src/recharge.cpp new file mode 100644 index 0000000..e69de29