refactor(low_controller): 移动UT_CPU_ID_NONE定义并更新引用

将UT_CPU_ID_NONE宏定义移动到头文件顶部常量定义区域
在cpp文件中使用新的宏定义位置替代完整命名空间引用
This commit is contained in:
2025-09-22 19:29:17 +08:00
parent 95446bdc94
commit 5247295521
2 changed files with 2 additions and 2 deletions

View File

@@ -7,10 +7,10 @@
#include <atomic>
#define TOPIC_LOWCMD "rt/lowcmd"
#define UT_CPU_ID_NONE -1
constexpr double PosStopF = (2.146E+9f);
constexpr double VelStopF = (16000.0f);
#define UT_CPU_ID_NONE -1
namespace custom {
class LowController {

View File

@@ -28,7 +28,7 @@ bool LowController::start()
return true;
}
running_ = true;
publish_thread_ = unitree::common::CreateRecurrentThreadEx("low_cmd_pub", unitree::common::UT_CPU_ID_NONE, 2000, &LowController::publishLoop, this);
publish_thread_ = unitree::common::CreateRecurrentThreadEx("low_cmd_pub", UT_CPU_ID_NONE, 2000, &LowController::publishLoop, this);
return true;
}