Planner acceleration bugfix and speedup v2

.) Use already existing inverse_millimeters instead of /
block->millimeters.
.) Prevent overflow during acceleration calculation by checking if float
is necessary. Idea modified from Sailfish.
.) Save two uint32_t or even float multiplications by checking if
step[AXIS] has steps and if max acceleration is lower than accel. If
not, there is no need to check this axis.
This commit is contained in:
Sebastianv650
2016-10-23 12:47:46 +02:00
parent aa99bd8d13
commit c397b9d60a
2 changed files with 36 additions and 9 deletions

View File

@@ -166,6 +166,11 @@ class Planner {
* Nominal speed of previous path line segment
*/
static float previous_nominal_speed;
/**
* Limit where 64bit math is necessary for acceleration calculation
*/
static uint32_t cutoff_long;
#if ENABLED(DISABLE_INACTIVE_EXTRUDER)
/**