From 97d048339bf95be12e97403ffaf1b184c8ea8a29 Mon Sep 17 00:00:00 2001 From: Sucan126 <632190820@qq.com> Date: Sun, 21 Sep 2025 14:45:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(controller):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E8=BF=90=E5=8A=A8=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理Controller类中不再使用的BodyHeight、SwitchGait、ContinuousGait和Dance2方法,以简化代码结构 --- src/controller.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 51066b9..fbadcc4 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -375,18 +375,6 @@ bool Controller::SwitchAvoidMode() { }); } -bool Controller::BodyHeight(float height) { - return ExecuteSportCmd([height](auto* sc) { - return sc->BodyHeight(height); - }); -} - -bool Controller::SwitchGait(int gait) { - return ExecuteSportCmd([gait](auto* sc) { - return sc->SwitchGait(gait); - }); -} - bool Controller::TrajectoryFollow(const std::vector>& path) { // This function requires special handling as it needs to convert the path format // For now, we'll provide a basic implementation @@ -397,11 +385,6 @@ bool Controller::TrajectoryFollow(const std::vector>& path) }); } -bool Controller::ContinuousGait(bool flag) { - return ExecuteSportCmd([flag](auto* sc) { - return sc->ContinuousGait(flag); - }); -} bool Controller::MoveToPos(float x, float y, float yaw) { return ExecuteSportCmd([x, y, yaw](auto* sc) { @@ -424,12 +407,6 @@ bool Controller::FootRaiseHeight(float height) { }); } -bool Controller::Dance2() { - return ExecuteSportCmd([](auto* sc) { - return sc->Dance2(); - }); -} -