Cleanup to planner.cpp
This commit is contained in:
parent
f105cad43c
commit
0e71e7b2fb
2 changed files with 4 additions and 6 deletions
|
@ -942,7 +942,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
||||||
* Having the real displacement of the head, we can calculate the total movement length and apply the desired speed.
|
* Having the real displacement of the head, we can calculate the total movement length and apply the desired speed.
|
||||||
*/
|
*/
|
||||||
#if IS_CORE
|
#if IS_CORE
|
||||||
float delta_mm[7];
|
float delta_mm[Z_HEAD + 1];
|
||||||
#if CORE_IS_XY
|
#if CORE_IS_XY
|
||||||
delta_mm[X_HEAD] = da * steps_to_mm[A_AXIS];
|
delta_mm[X_HEAD] = da * steps_to_mm[A_AXIS];
|
||||||
delta_mm[Y_HEAD] = db * steps_to_mm[B_AXIS];
|
delta_mm[Y_HEAD] = db * steps_to_mm[B_AXIS];
|
||||||
|
@ -963,7 +963,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
||||||
delta_mm[C_AXIS] = CORESIGN(db - dc) * steps_to_mm[C_AXIS];
|
delta_mm[C_AXIS] = CORESIGN(db - dc) * steps_to_mm[C_AXIS];
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
float delta_mm[4];
|
float delta_mm[XYZE];
|
||||||
delta_mm[X_AXIS] = da * steps_to_mm[X_AXIS];
|
delta_mm[X_AXIS] = da * steps_to_mm[X_AXIS];
|
||||||
delta_mm[Y_AXIS] = db * steps_to_mm[Y_AXIS];
|
delta_mm[Y_AXIS] = db * steps_to_mm[Y_AXIS];
|
||||||
delta_mm[Z_AXIS] = dc * steps_to_mm[Z_AXIS];
|
delta_mm[Z_AXIS] = dc * steps_to_mm[Z_AXIS];
|
||||||
|
@ -995,10 +995,10 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
||||||
|
|
||||||
// Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill
|
// Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill
|
||||||
#if ENABLED(SLOWDOWN) || ENABLED(ULTRA_LCD) || defined(XY_FREQUENCY_LIMIT)
|
#if ENABLED(SLOWDOWN) || ENABLED(ULTRA_LCD) || defined(XY_FREQUENCY_LIMIT)
|
||||||
|
// Segment time im micro seconds
|
||||||
unsigned long segment_time = lround(1000000.0 / inverse_mm_s);
|
unsigned long segment_time = lround(1000000.0 / inverse_mm_s);
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(SLOWDOWN)
|
#if ENABLED(SLOWDOWN)
|
||||||
// Segment time im micro seconds
|
|
||||||
if (moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE) / 2) {
|
if (moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE) / 2) {
|
||||||
if (segment_time < min_segment_time) {
|
if (segment_time < min_segment_time) {
|
||||||
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
|
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
|
||||||
|
|
|
@ -414,9 +414,7 @@ class Planner {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(AUTOTEMP)
|
#if ENABLED(AUTOTEMP)
|
||||||
static float autotemp_max;
|
static float autotemp_min, autotemp_max, autotemp_factor;
|
||||||
static float autotemp_min;
|
|
||||||
static float autotemp_factor;
|
|
||||||
static bool autotemp_enabled;
|
static bool autotemp_enabled;
|
||||||
static void getHighESpeed();
|
static void getHighESpeed();
|
||||||
static void autotemp_M104_M109();
|
static void autotemp_M104_M109();
|
||||||
|
|
Reference in a new issue