feat: 添加多线程框架与轴周期接口
- 新增 MotionTickThread 线程模块 - main.cpp: 引入双线程架构(UserAppThread + MotionTickThread) - Axis: 新增 cycle() 接口,添加 #pragma once 头文件保护 - App/CMakeLists.txt: 链接 pthread,重组源文件列表 - .gitignore: 排除 docs/html、.vscode、compile_commands.json
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
* @copyright Copyright (c) 2026
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
namespace plcopen {
|
||||
@@ -54,6 +57,10 @@ public:
|
||||
* \param name 轴名称
|
||||
*/
|
||||
explicit Axis(UINT axisNo = 1, std::string name = "Axis1");
|
||||
|
||||
void cycle();
|
||||
|
||||
|
||||
private:
|
||||
AXIS_REF ref_;
|
||||
MC_AXIS_STATE state_ = MC_AXIS_STATE::Disabled;
|
||||
|
||||
@@ -18,4 +18,10 @@ Axis::Axis(UINT axisNo, std::string name) {
|
||||
ref_.axisName = std::move(name);
|
||||
ref_.axis = this;
|
||||
}
|
||||
|
||||
void Axis::cycle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user