浏览代码

Stepper::set_position needed for some applications

Scott Lahteine 7 年前
父节点
当前提交
65a004564c
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15
    0
      Marlin/src/module/stepper.h

+ 15
- 0
Marlin/src/module/stepper.h 查看文件

244
       static void refresh_motor_power();
244
       static void refresh_motor_power();
245
     #endif
245
     #endif
246
 
246
 
247
+    // Set the current position in steps
248
+    inline static void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) {
249
+      planner.synchronize();
250
+      CRITICAL_SECTION_START;
251
+      _set_position(a, b, c, e);
252
+      CRITICAL_SECTION_END;
253
+    }
254
+
255
+    inline static void set_position(const AxisEnum a, const int32_t &v) {
256
+      planner.synchronize();
257
+      CRITICAL_SECTION_START;
258
+      count_position[a] = v;
259
+      CRITICAL_SECTION_END;
260
+    }
261
+
247
   private:
262
   private:
248
 
263
 
249
     // Set the current position in steps
264
     // Set the current position in steps

正在加载...
取消
保存