refactor(low_controller): 移除停止时的线程清理并添加CPU ID宏定义
移除LowController::stop()中不必要的线程清理代码,因为running_标志位已足够控制线程行为 在头文件中添加UT_CPU_ID_NONE宏定义用于CPU标识
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
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 {
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ bool LowController::stop()
|
|||||||
if(running_)
|
if(running_)
|
||||||
{
|
{
|
||||||
running_ = false;
|
running_ = false;
|
||||||
if (publish_thread_)
|
|
||||||
{
|
|
||||||
publish_thread_->join();
|
|
||||||
publish_thread_.reset();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user