From 175b37ad49ada55ecd3d1055114ebc0920961b0d Mon Sep 17 00:00:00 2001 From: Sucan126 <632190820@qq.com> Date: Tue, 23 Sep 2025 19:22:08 +0800 Subject: [PATCH] refactor(controller): Replace ClassicWalk with StaticWalk method - Renamed the ClassicWalk method to StaticWalk in the controller interface, removing the flag parameter for a simplified usage. - Updated the implementation to reflect the new method signature, ensuring consistency across the controller functionality. --- include/controller.hpp | 2 +- src/controller.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/controller.hpp b/include/controller.hpp index 895e7f8..2a7134a 100644 --- a/include/controller.hpp +++ b/include/controller.hpp @@ -58,7 +58,7 @@ public: bool FreeBound(bool flag); bool FreeJump(bool flag); bool FreeAvoid(bool flag); - bool ClassicWalk(bool flag); + bool StaticWalk(); bool WalkUpright(bool flag); bool CrossStep(bool flag); bool TrajectoryFollow(std::vector& path); diff --git a/src/controller.cpp b/src/controller.cpp index dd0760e..0fd8bae 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -287,13 +287,13 @@ bool Controller::Dance2() { bool Controller::LeftFlip() { return ExecuteSportCmd([](auto* sc) { - // return sc->LeftFlip(); + return sc->LeftFlip(); }); } bool Controller::BackFlip() { return ExecuteSportCmd([](auto* sc) { - // return sc->BackFlip(); + return sc->BackFlip(); }); } @@ -321,9 +321,9 @@ bool Controller::FreeAvoid(bool flag) { }); } -bool Controller::ClassicWalk(bool flag) { - return ExecuteSportCmd([flag](auto* sc) { - return sc->ClassicWalk(flag); +bool Controller::StaticWalk() { + return ExecuteSportCmd([](auto* sc) { + return sc->StaticWalk(); }); }