瀏覽代碼

Comments on some movement functions

Scott Lahteine 9 年之前
父節點
當前提交
5fd20ecac3
共有 1 個檔案被更改,包括 15 行新增0 行删除
  1. 15
    0
      Marlin/Marlin_main.cpp

+ 15
- 0
Marlin/Marlin_main.cpp 查看文件

1303
   }
1303
   }
1304
   feedrate = homing_feedrate[axis] / hbd;
1304
   feedrate = homing_feedrate[axis] / hbd;
1305
 }
1305
 }
1306
+//
1307
+// line_to_current_position
1308
+// Move the planner to the current position from wherever it last moved
1309
+// (or from wherever it has been told it is located).
1310
+//
1306
 inline void line_to_current_position() {
1311
 inline void line_to_current_position() {
1307
   plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate / 60, active_extruder);
1312
   plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate / 60, active_extruder);
1308
 }
1313
 }
1309
 inline void line_to_z(float zPosition) {
1314
 inline void line_to_z(float zPosition) {
1310
   plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate / 60, active_extruder);
1315
   plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate / 60, active_extruder);
1311
 }
1316
 }
1317
+//
1318
+// line_to_destination
1319
+// Move the planner, not necessarily synced with current_position
1320
+//
1312
 inline void line_to_destination(float mm_m) {
1321
 inline void line_to_destination(float mm_m) {
1313
   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m / 60, active_extruder);
1322
   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m / 60, active_extruder);
1314
 }
1323
 }
1315
 inline void line_to_destination() {
1324
 inline void line_to_destination() {
1316
   line_to_destination(feedrate);
1325
   line_to_destination(feedrate);
1317
 }
1326
 }
1327
+/**
1328
+ * sync_plan_position
1329
+ * Set planner / stepper positions to the cartesian current_position.
1330
+ * The stepper code translates these coordinates into step units.
1331
+ * Allows translation between steps and units (mm) for cartesian & core robots
1332
+ */
1318
 inline void sync_plan_position() {
1333
 inline void sync_plan_position() {
1319
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1334
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1320
     if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position);
1335
     if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position);

Loading…
取消
儲存