[1.1.x] LIN_ADVANCE v1.5 (#9700)
This commit is contained in:
parent
e41b2274b0
commit
9c65890644
45 changed files with 774 additions and 1429 deletions
|
|
@ -99,7 +99,10 @@ typedef struct {
|
|||
// Advance extrusion
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
bool use_advance_lead;
|
||||
uint32_t abs_adv_steps_multiplier8; // Factorised by 2^8 to avoid float
|
||||
uint16_t advance_speed, // Timer value for extruder speed offset
|
||||
max_adv_steps, // max. advance steps to get cruising speed pressure (not always nominal_speed!)
|
||||
final_adv_steps; // advance steps due to exit speed
|
||||
float e_D_ratio;
|
||||
#endif
|
||||
|
||||
// Fields used by the motion planner to manage acceleration
|
||||
|
|
@ -191,9 +194,8 @@ class Planner {
|
|||
#endif
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
static float extruder_advance_k, advance_ed_ratio,
|
||||
position_float[XYZE],
|
||||
lin_dist_xy, lin_dist_e;
|
||||
static float extruder_advance_K,
|
||||
position_float[XYZE];
|
||||
#endif
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
|
|
@ -414,7 +416,12 @@ class Planner {
|
|||
* extruder - target extruder
|
||||
* millimeters - the length of the movement, if known
|
||||
*/
|
||||
static void _buffer_steps(const int32_t (&target)[XYZE], float fr_mm_s, const uint8_t extruder, const float &millimeters=0.0);
|
||||
static void _buffer_steps(const int32_t (&target)[XYZE]
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
, const float (&target_float)[XYZE]
|
||||
#endif
|
||||
, float fr_mm_s, const uint8_t extruder, const float &millimeters=0.0
|
||||
);
|
||||
|
||||
/**
|
||||
* Planner::buffer_segment
|
||||
|
|
@ -537,7 +544,7 @@ class Planner {
|
|||
|
||||
// If the block has no trapezoid calculated, it's unsafe to execute.
|
||||
if (movesplanned() > 1) {
|
||||
block_t* next = &block_buffer[next_block_index(block_buffer_tail)];
|
||||
const block_t * const next = &block_buffer[next_block_index(block_buffer_tail)];
|
||||
if (TEST(block->flag, BLOCK_BIT_RECALCULATE) || TEST(next->flag, BLOCK_BIT_RECALCULATE))
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue