Browse Source

Clarify what are "logical" positions in the planner

Scott Lahteine 7 years ago
parent
commit
87921f390a
2 changed files with 13 additions and 13 deletions
  1. 5
    5
      Marlin/planner.cpp
  2. 8
    8
      Marlin/planner.h

+ 5
- 5
Marlin/planner.cpp View File

@@ -1372,16 +1372,16 @@ void Planner::_set_position_mm(const float &a, const float &b, const float &c, c
1372 1372
 
1373 1373
 void Planner::set_position_mm_kinematic(const float position[NUM_AXIS]) {
1374 1374
   #if PLANNER_LEVELING
1375
-    float pos[XYZ] = { position[X_AXIS], position[Y_AXIS], position[Z_AXIS] };
1376
-    apply_leveling(pos);
1375
+    float lpos[XYZ] = { position[X_AXIS], position[Y_AXIS], position[Z_AXIS] };
1376
+    apply_leveling(lpos);
1377 1377
   #else
1378
-    const float * const pos = position;
1378
+    const float * const lpos = position;
1379 1379
   #endif
1380 1380
   #if IS_KINEMATIC
1381
-    inverse_kinematics(pos);
1381
+    inverse_kinematics(lpos);
1382 1382
     _set_position_mm(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], position[E_AXIS]);
1383 1383
   #else
1384
-    _set_position_mm(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], position[E_AXIS]);
1384
+    _set_position_mm(lpos[X_AXIS], lpos[Y_AXIS], lpos[Z_AXIS], position[E_AXIS]);
1385 1385
   #endif
1386 1386
 }
1387 1387
 

+ 8
- 8
Marlin/planner.h View File

@@ -308,22 +308,22 @@ class Planner {
308 308
      * The target is cartesian, it's translated to delta/scara if
309 309
      * needed.
310 310
      *
311
-     *  target   - x,y,z,e CARTESIAN target in mm
311
+     *  ltarget  - x,y,z,e CARTESIAN target in mm
312 312
      *  fr_mm_s  - (target) speed of the move (mm/s)
313 313
      *  extruder - target extruder
314 314
      */
315
-    static FORCE_INLINE void buffer_line_kinematic(const float target[XYZE], const float &fr_mm_s, const uint8_t extruder) {
315
+    static FORCE_INLINE void buffer_line_kinematic(const float ltarget[XYZE], const float &fr_mm_s, const uint8_t extruder) {
316 316
       #if PLANNER_LEVELING
317
-        float pos[XYZ] = { target[X_AXIS], target[Y_AXIS], target[Z_AXIS] };
318
-        apply_leveling(pos);
317
+        float lpos[XYZ] = { ltarget[X_AXIS], ltarget[Y_AXIS], ltarget[Z_AXIS] };
318
+        apply_leveling(lpos);
319 319
       #else
320
-        const float * const pos = target;
320
+        const float * const lpos = ltarget;
321 321
       #endif
322 322
       #if IS_KINEMATIC
323
-        inverse_kinematics(pos);
324
-        _buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], target[E_AXIS], fr_mm_s, extruder);
323
+        inverse_kinematics(lpos);
324
+        _buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
325 325
       #else
326
-        _buffer_line(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], target[E_AXIS], fr_mm_s, extruder);
326
+        _buffer_line(lpos[X_AXIS], lpos[Y_AXIS], lpos[Z_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
327 327
       #endif
328 328
     }
329 329
 

Loading…
Cancel
Save