Selaa lähdekoodia

🩹 Remove obsolete split_move

Scott Lahteine 1 vuosi sitten
vanhempi
commit
9c376f120c
2 muutettua tiedostoa jossa 32 lisäystä ja 21 poistoa
  1. 18
    12
      Marlin/src/module/planner.cpp
  2. 14
    9
      Marlin/src/module/planner.h

+ 18
- 12
Marlin/src/module/planner.cpp Näytä tiedosto

@@ -1794,7 +1794,7 @@ bool Planner::_buffer_steps(const xyze_long_t &target
1794 1794
   if (cleaning_buffer_counter) return false;
1795 1795
 
1796 1796
   // Fill the block with the specified movement
1797
-  if (!_populate_block(block, false, target
1797
+  if (!_populate_block(block, target
1798 1798
         OPTARG(HAS_POSITION_FLOAT, target_float)
1799 1799
         OPTARG(HAS_DIST_MM_ARG, cart_dist_mm)
1800 1800
         , fr_mm_s, extruder, millimeters
@@ -1826,17 +1826,24 @@ bool Planner::_buffer_steps(const xyze_long_t &target
1826 1826
 }
1827 1827
 
1828 1828
 /**
1829
- * Planner::_populate_block
1829
+ * @brief Populate a block in preparation for insertion
1830
+ * @details Populate the fields of a new linear movement block
1831
+ *          that will be added to the queue and processed soon
1832
+ *          by the Stepper ISR.
1830 1833
  *
1831
- * Fills a new linear movement in the block (in terms of steps).
1834
+ * @param block         A block to populate
1835
+ * @param target        Target position in steps units
1836
+ * @param target_float  Target position in native mm
1837
+ * @param cart_dist_mm  The pre-calculated move lengths for all axes, in mm
1838
+ * @param fr_mm_s       (target) speed of the move
1839
+ * @param extruder      target extruder
1840
+ * @param millimeters   A pre-calculated linear distance for the move, in mm,
1841
+ *                      or 0.0 to have the distance calculated here.
1832 1842
  *
1833
- *  target      - target position in steps units
1834
- *  fr_mm_s     - (target) speed of the move
1835
- *  extruder    - target extruder
1836
- *
1837
- * Returns true if movement is acceptable, false otherwise
1843
+ * @return  true if movement is acceptable, false otherwise
1838 1844
  */
1839
-bool Planner::_populate_block(block_t * const block, bool split_move,
1845
+bool Planner::_populate_block(
1846
+  block_t * const block,
1840 1847
   const abce_long_t &target
1841 1848
   OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float)
1842 1849
   OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm)
@@ -2849,9 +2856,8 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2849 2856
   // Initialize block entry speed. Compute based on deceleration to user-defined MINIMUM_PLANNER_SPEED.
2850 2857
   const float v_allowable_sqr = max_allowable_speed_sqr(-block->acceleration, sq(float(MINIMUM_PLANNER_SPEED)), block->millimeters);
2851 2858
 
2852
-  // If we are trying to add a split block, start with the
2853
-  // max. allowed speed to avoid an interrupted first move.
2854
-  block->entry_speed_sqr = !split_move ? sq(float(MINIMUM_PLANNER_SPEED)) : _MIN(vmax_junction_sqr, v_allowable_sqr);
2859
+  // Start with the minimum allowed speed
2860
+  block->entry_speed_sqr = sq(float(MINIMUM_PLANNER_SPEED));
2855 2861
 
2856 2862
   // Initialize planner efficiency flags
2857 2863
   // Set flag if block will always reach maximum junction speed regardless of entry/exit speeds.

+ 14
- 9
Marlin/src/module/planner.h Näytä tiedosto

@@ -760,18 +760,23 @@ class Planner {
760 760
     );
761 761
 
762 762
     /**
763
-     * Planner::_populate_block
763
+     * @brief Populate a block in preparation for insertion
764
+     * @details Populate the fields of a new linear movement block
765
+     *          that will be added to the queue and processed soon
766
+     *          by the Stepper ISR.
764 767
      *
765
-     * Fills a new linear movement in the block (in terms of steps).
768
+     * @param block         A block to populate
769
+     * @param target        Target position in steps units
770
+     * @param target_float  Target position in native mm
771
+     * @param cart_dist_mm  The pre-calculated move lengths for all axes, in mm
772
+     * @param fr_mm_s       (target) speed of the move
773
+     * @param extruder      target extruder
774
+     * @param millimeters   A pre-calculated linear distance for the move, in mm,
775
+     *                      or 0.0 to have the distance calculated here.
766 776
      *
767
-     *  target      - target position in steps units
768
-     *  fr_mm_s     - (target) speed of the move
769
-     *  extruder    - target extruder
770
-     *  millimeters - the length of the movement, if known
771
-     *
772
-     * Returns true is movement is acceptable, false otherwise
777
+     * @return  true if movement is acceptable, false otherwise
773 778
      */
774
-    static bool _populate_block(block_t * const block, bool split_move, const xyze_long_t &target
779
+    static bool _populate_block(block_t * const block, const xyze_long_t &target
775 780
       OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float)
776 781
       OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm)
777 782
       , feedRate_t fr_mm_s, const uint8_t extruder, const_float_t millimeters=0.0

Loading…
Peruuta
Tallenna