Skip to content

Commit 86e6f9e

Browse files
committed
🩹 Remove obsolete split_move
1 parent b3018da commit 86e6f9e

File tree

2 files changed

+37
-25
lines changed

2 files changed

+37
-25
lines changed

Marlin/src/module/planner.cpp

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,11 +1789,12 @@ bool Planner::_buffer_steps(const xyze_long_t &target
17891789
if (cleaning_buffer_counter) return false;
17901790

17911791
// Fill the block with the specified movement
1792-
if (!_populate_block(block, false, target
1793-
OPTARG(HAS_POSITION_FLOAT, target_float)
1794-
OPTARG(HAS_DIST_MM_ARG, cart_dist_mm)
1795-
, fr_mm_s, extruder, millimeters
1796-
)) {
1792+
if (!_populate_block(block, target
1793+
OPTARG(HAS_POSITION_FLOAT, target_float)
1794+
OPTARG(HAS_DIST_MM_ARG, cart_dist_mm)
1795+
, fr_mm_s, extruder, millimeters
1796+
)
1797+
) {
17971798
// Movement was not queued, probably because it was too short.
17981799
// Simply accept that as movement queued and done
17991800
return true;
@@ -1820,17 +1821,24 @@ bool Planner::_buffer_steps(const xyze_long_t &target
18201821
}
18211822

18221823
/**
1823-
* Planner::_populate_block
1824-
*
1825-
* Fills a new linear movement in the block (in terms of steps).
1824+
* @brief Populate a block in preparation for insertion
1825+
* @details Populate the fields of a new linear movement block
1826+
* that will be added to the queue and processed soon
1827+
* by the Stepper ISR.
18261828
*
1827-
* target - target position in steps units
1828-
* fr_mm_s - (target) speed of the move
1829-
* extruder - target extruder
1829+
* @param block A block to populate
1830+
* @param target Target position in steps units
1831+
* @param target_float Target position in native mm
1832+
* @param cart_dist_mm The pre-calculated move lengths for all axes, in mm
1833+
* @param fr_mm_s (target) speed of the move
1834+
* @param extruder target extruder
1835+
* @param millimeters A pre-calculated linear distance for the move, in mm,
1836+
* or 0.0 to have the distance calculated here.
18301837
*
1831-
* Returns true if movement is acceptable, false otherwise
1838+
* @return true if movement is acceptable, false otherwise
18321839
*/
1833-
bool Planner::_populate_block(block_t * const block, bool split_move,
1840+
bool Planner::_populate_block(
1841+
block_t * const block,
18341842
const abce_long_t &target
18351843
OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float)
18361844
OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm)
@@ -2774,9 +2782,8 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
27742782
// Initialize block entry speed. Compute based on deceleration to user-defined MINIMUM_PLANNER_SPEED.
27752783
const float v_allowable_sqr = max_allowable_speed_sqr(-block->acceleration, sq(float(MINIMUM_PLANNER_SPEED)), block->millimeters);
27762784

2777-
// If we are trying to add a split block, start with the
2778-
// max. allowed speed to avoid an interrupted first move.
2779-
block->entry_speed_sqr = !split_move ? sq(float(MINIMUM_PLANNER_SPEED)) : _MIN(vmax_junction_sqr, v_allowable_sqr);
2785+
// Start with the minimum allowed speed
2786+
block->entry_speed_sqr = sq(float(MINIMUM_PLANNER_SPEED));
27802787

27812788
// Initialize planner efficiency flags
27822789
// Set flag if block will always reach maximum junction speed regardless of entry/exit speeds.

Marlin/src/module/planner.h

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -737,18 +737,23 @@ class Planner {
737737
);
738738

739739
/**
740-
* Planner::_populate_block
740+
* @brief Populate a block in preparation for insertion
741+
* @details Populate the fields of a new linear movement block
742+
* that will be added to the queue and processed soon
743+
* by the Stepper ISR.
741744
*
742-
* Fills a new linear movement in the block (in terms of steps).
745+
* @param block A block to populate
746+
* @param target Target position in steps units
747+
* @param target_float Target position in native mm
748+
* @param cart_dist_mm The pre-calculated move lengths for all axes, in mm
749+
* @param fr_mm_s (target) speed of the move
750+
* @param extruder target extruder
751+
* @param millimeters A pre-calculated linear distance for the move, in mm,
752+
* or 0.0 to have the distance calculated here.
743753
*
744-
* target - target position in steps units
745-
* fr_mm_s - (target) speed of the move
746-
* extruder - target extruder
747-
* millimeters - the length of the movement, if known
748-
*
749-
* Returns true is movement is acceptable, false otherwise
754+
* @return true if movement is acceptable, false otherwise
750755
*/
751-
static bool _populate_block(block_t * const block, bool split_move, const xyze_long_t &target
756+
static bool _populate_block(block_t * const block, const xyze_long_t &target
752757
OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float)
753758
OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm)
754759
, feedRate_t fr_mm_s, const uint8_t extruder, const_float_t millimeters=0.0

0 commit comments

Comments
 (0)