refactor(low_controller): 移动UT_CPU_ID_NONE定义并更新引用
将UT_CPU_ID_NONE宏定义移动到头文件顶部常量定义区域 在cpp文件中使用新的宏定义位置替代完整命名空间引用
This commit is contained in:
@@ -7,10 +7,10 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#define TOPIC_LOWCMD "rt/lowcmd"
|
#define TOPIC_LOWCMD "rt/lowcmd"
|
||||||
|
#define UT_CPU_ID_NONE -1
|
||||||
|
|
||||||
constexpr double PosStopF = (2.146E+9f);
|
constexpr double PosStopF = (2.146E+9f);
|
||||||
constexpr double VelStopF = (16000.0f);
|
constexpr double VelStopF = (16000.0f);
|
||||||
#define UT_CPU_ID_NONE -1
|
|
||||||
namespace custom {
|
namespace custom {
|
||||||
|
|
||||||
class LowController {
|
class LowController {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ bool LowController::start()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
running_ = 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user