Adaptive multiaxis step smoothing

- Stepper bugs fixed
- Support MIXING_EXTRUDER with Linear Advance
- Miscellaneous cleanup
This commit is contained in:
etagle
2018-06-03 00:59:21 -03:00
committed by Scott Lahteine
parent ae15c5af88
commit 39a7e7720d
57 changed files with 1293 additions and 498 deletions

View File

@ -679,9 +679,9 @@ void Planner::init() {
return r11 | (uint16_t(r12) << 8) | (uint32_t(r13) << 16);
}
#else
// All the other 32 CPUs can easily perform the inverse using hardware division,
// All other 32-bit MPUs can easily do inverse using hardware division,
// so we don't need to reduce precision or to use assembly language at all.
// This routine, for all the other archs, returns 0x100000000 / d ~= 0xFFFFFFFF / d
// This routine, for all other archs, returns 0x100000000 / d ~= 0xFFFFFFFF / d
static FORCE_INLINE uint32_t get_period_inverse(const uint32_t d) { return 0xFFFFFFFF / d; }
#endif
#endif
@ -1646,10 +1646,16 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
// Bail if this is a zero-length block
if (block->step_event_count < MIN_STEPS_PER_SEGMENT) return false;
// For a mixing extruder, get a magnified step_event_count for each
// For a mixing extruder, get a magnified esteps for each
#if ENABLED(MIXING_EXTRUDER)
for (uint8_t i = 0; i < MIXING_STEPPERS; i++)
block->mix_event_count[i] = mixing_factor[i] * block->step_event_count;
block->mix_steps[i] = mixing_factor[i] * (
#if ENABLED(LIN_ADVANCE)
esteps
#else
block->step_event_count
#endif
);
#endif
#if FAN_COUNT > 0