소스 검색

_buffer_line => buffer_segment

Scott Lahteine 7 년 전
부모
커밋
8244284116
3개의 변경된 파일23개의 추가작업 그리고 23개의 파일을 삭제
  1. 4
    4
      Marlin/planner.cpp
  2. 6
    6
      Marlin/planner.h
  3. 13
    13
      Marlin/ubl_motion.cpp

+ 4
- 4
Marlin/planner.cpp 파일 보기

@@ -1354,7 +1354,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const
1354 1354
 } // _buffer_steps()
1355 1355
 
1356 1356
 /**
1357
- * Planner::_buffer_line
1357
+ * Planner::buffer_segment
1358 1358
  *
1359 1359
  * Add a new linear movement to the buffer in axis units.
1360 1360
  *
@@ -1364,7 +1364,7 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const
1364 1364
  *  fr_mm_s   - (target) speed of the move
1365 1365
  *  extruder  - target extruder
1366 1366
  */
1367
-void Planner::_buffer_line(const float &a, const float &b, const float &c, const float &e, const float &fr_mm_s, const uint8_t extruder) {
1367
+void Planner::buffer_segment(const float &a, const float &b, const float &c, const float &e, const float &fr_mm_s, const uint8_t extruder) {
1368 1368
   // When changing extruders recalculate steps corresponding to the E position
1369 1369
   #if ENABLED(DISTINCT_E_FACTORS)
1370 1370
     if (last_extruder != extruder && axis_steps_per_mm[E_AXIS_N] != axis_steps_per_mm[E_AXIS + last_extruder]) {
@@ -1383,7 +1383,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1383 1383
   };
1384 1384
 
1385 1385
   /* <-- add a slash to enable
1386
-    SERIAL_ECHOPAIR("  _buffer_line FR:", fr_mm_s);
1386
+    SERIAL_ECHOPAIR("  buffer_segment FR:", fr_mm_s);
1387 1387
     #if IS_KINEMATIC
1388 1388
       SERIAL_ECHOPAIR(" A:", a);
1389 1389
       SERIAL_ECHOPAIR(" (", position[A_AXIS]);
@@ -1430,7 +1430,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1430 1430
 
1431 1431
   stepper.wake_up();
1432 1432
 
1433
-} // _buffer_line()
1433
+} // buffer_segment()
1434 1434
 
1435 1435
 /**
1436 1436
  * Directly set the planner XYZ position (and stepper positions)

+ 6
- 6
Marlin/planner.h 파일 보기

@@ -142,7 +142,7 @@ class Planner {
142 142
      *            head!=tail : blocks are in the buffer
143 143
      *   head==(tail-1)%size : the buffer is full
144 144
      *
145
-     *  Writer of head is Planner::_buffer_line().
145
+     *  Writer of head is Planner::buffer_segment().
146 146
      *  Reader of tail is Stepper::isr(). Always consider tail busy / read-only
147 147
      */
148 148
     static block_t block_buffer[BLOCK_BUFFER_SIZE];
@@ -375,7 +375,7 @@ class Planner {
375 375
     static void _buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const uint8_t extruder);
376 376
 
377 377
     /**
378
-     * Planner::_buffer_line
378
+     * Planner::buffer_segment
379 379
      *
380 380
      * Add a new linear movement to the buffer in axis units.
381 381
      *
@@ -385,7 +385,7 @@ class Planner {
385 385
      *  fr_mm_s   - (target) speed of the move
386 386
      *  extruder  - target extruder
387 387
      */
388
-    static void _buffer_line(const float &a, const float &b, const float &c, const float &e, const float &fr_mm_s, const uint8_t extruder);
388
+    static void buffer_segment(const float &a, const float &b, const float &c, const float &e, const float &fr_mm_s, const uint8_t extruder);
389 389
 
390 390
     static void _set_position_mm(const float &a, const float &b, const float &c, const float &e);
391 391
 
@@ -405,7 +405,7 @@ class Planner {
405 405
       #if PLANNER_LEVELING && IS_CARTESIAN
406 406
         apply_leveling(rx, ry, rz);
407 407
       #endif
408
-      _buffer_line(rx, ry, rz, e, fr_mm_s, extruder);
408
+      buffer_segment(rx, ry, rz, e, fr_mm_s, extruder);
409 409
     }
410 410
 
411 411
     /**
@@ -426,9 +426,9 @@ class Planner {
426 426
       #endif
427 427
       #if IS_KINEMATIC
428 428
         inverse_kinematics(raw);
429
-        _buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], cart[E_AXIS], fr_mm_s, extruder);
429
+        buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], cart[E_AXIS], fr_mm_s, extruder);
430 430
       #else
431
-        _buffer_line(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], cart[E_AXIS], fr_mm_s, extruder);
431
+        buffer_segment(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], cart[E_AXIS], fr_mm_s, extruder);
432 432
       #endif
433 433
     }
434 434
 

+ 13
- 13
Marlin/ubl_motion.cpp 파일 보기

@@ -134,7 +134,7 @@
134 134
         // Note: There is no Z Correction in this case. We are off the grid and don't know what
135 135
         // a reasonable correction would be.
136 136
 
137
-        planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
137
+        planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
138 138
         set_current_from_destination();
139 139
 
140 140
         if (g26_debug_flag)
@@ -178,7 +178,7 @@
178 178
        */
179 179
       if (isnan(z0)) z0 = 0.0;
180 180
 
181
-      planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0, end[E_AXIS], feed_rate, extruder);
181
+      planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0, end[E_AXIS], feed_rate, extruder);
182 182
 
183 183
       if (g26_debug_flag)
184 184
         debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
@@ -269,7 +269,7 @@
269 269
          * Without this check, it is possible for the algorithm to generate a zero length move in the case
270 270
          * where the line is heading down and it is starting right on a Mesh Line boundary. For how often that
271 271
          * happens, it might be best to remove the check and always 'schedule' the move because
272
-         * the planner._buffer_line() routine will filter it if that happens.
272
+         * the planner.buffer_segment() routine will filter it if that happens.
273 273
          */
274 274
         if (ry != start[Y_AXIS]) {
275 275
           if (!inf_normalized_flag) {
@@ -282,7 +282,7 @@
282 282
             z_position = end[Z_AXIS];
283 283
           }
284 284
 
285
-          planner._buffer_line(rx, ry, z_position + z0, e_position, feed_rate, extruder);
285
+          planner.buffer_segment(rx, ry, z_position + z0, e_position, feed_rate, extruder);
286 286
         } //else printf("FIRST MOVE PRUNED  ");
287 287
       }
288 288
 
@@ -333,7 +333,7 @@
333 333
          * Without this check, it is possible for the algorithm to generate a zero length move in the case
334 334
          * where the line is heading left and it is starting right on a Mesh Line boundary. For how often
335 335
          * that happens, it might be best to remove the check and always 'schedule' the move because
336
-         * the planner._buffer_line() routine will filter it if that happens.
336
+         * the planner.buffer_segment() routine will filter it if that happens.
337 337
          */
338 338
         if (rx != start[X_AXIS]) {
339 339
           if (!inf_normalized_flag) {
@@ -346,7 +346,7 @@
346 346
             z_position = end[Z_AXIS];
347 347
           }
348 348
 
349
-          planner._buffer_line(rx, ry, z_position + z0, e_position, feed_rate, extruder);
349
+          planner.buffer_segment(rx, ry, z_position + z0, e_position, feed_rate, extruder);
350 350
         } //else printf("FIRST MOVE PRUNED  ");
351 351
       }
352 352
 
@@ -408,7 +408,7 @@
408 408
           e_position = end[E_AXIS];
409 409
           z_position = end[Z_AXIS];
410 410
         }
411
-        planner._buffer_line(rx, next_mesh_line_y, z_position + z0, e_position, feed_rate, extruder);
411
+        planner.buffer_segment(rx, next_mesh_line_y, z_position + z0, e_position, feed_rate, extruder);
412 412
         current_yi += dyi;
413 413
         yi_cnt--;
414 414
       }
@@ -436,7 +436,7 @@
436 436
           z_position = end[Z_AXIS];
437 437
         }
438 438
 
439
-        planner._buffer_line(next_mesh_line_x, ry, z_position + z0, e_position, feed_rate, extruder);
439
+        planner.buffer_segment(next_mesh_line_x, ry, z_position + z0, e_position, feed_rate, extruder);
440 440
         current_xi += dxi;
441 441
         xi_cnt--;
442 442
       }
@@ -468,14 +468,14 @@
468 468
     #endif
469 469
 
470 470
     // We don't want additional apply_leveling() performed by regular buffer_line or buffer_line_kinematic,
471
-    // so we call _buffer_line directly here.  Per-segmented leveling and kinematics performed first.
471
+    // so we call buffer_segment directly here.  Per-segmented leveling and kinematics performed first.
472 472
 
473 473
     inline void _O2 ubl_buffer_segment_raw(const float raw[XYZE], const float &fr) {
474 474
 
475 475
       #if ENABLED(DELTA)  // apply delta inverse_kinematics
476 476
 
477 477
         DELTA_RAW_IK();
478
-        planner._buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], fr, active_extruder);
478
+        planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], fr, active_extruder);
479 479
 
480 480
       #elif IS_SCARA  // apply scara inverse_kinematics (should be changed to save raw->logical->raw)
481 481
 
@@ -488,11 +488,11 @@
488 488
         scara_oldB = delta[B_AXIS];
489 489
         float s_feedrate = max(adiff, bdiff) * scara_feed_factor;
490 490
 
491
-        planner._buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], s_feedrate, active_extruder);
491
+        planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], s_feedrate, active_extruder);
492 492
 
493 493
       #else // CARTESIAN
494 494
 
495
-        planner._buffer_line(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], raw[E_AXIS], fr, active_extruder);
495
+        planner.buffer_segment(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], raw[E_AXIS], fr, active_extruder);
496 496
 
497 497
       #endif
498 498
     }
@@ -511,7 +511,7 @@
511 511
 
512 512
     /**
513 513
      * Prepare a segmented linear move for DELTA/SCARA/CARTESIAN with UBL and FADE semantics.
514
-     * This calls planner._buffer_line multiple times for small incremental moves.
514
+     * This calls planner.buffer_segment multiple times for small incremental moves.
515 515
      * Returns true if did NOT move, false if moved (requires current_position update).
516 516
      */
517 517
 

Loading…
취소
저장