Formatting sanity

This commit is contained in:
Yuri D'Elia 2019-03-18 18:43:22 +01:00
parent eeea2725cb
commit 45563bfdd3

View File

@ -126,8 +126,8 @@ float extrude_min_temp=EXTRUDE_MINTEMP;
#endif
#ifdef LIN_ADVANCE
float extruder_advance_K = LIN_ADVANCE_K,
position_float[NUM_AXIS] = { 0 };
float extruder_advance_K = LIN_ADVANCE_K;
float position_float[NUM_AXIS] = { 0 };
#endif
// Returns the index of the next block in the ring buffer
@ -1017,19 +1017,15 @@ Having the real displacement of the head, we can calculate the total movement le
#ifdef LIN_ADVANCE
/**
*
* Use LIN_ADVANCE for blocks if all these are true:
*
* block->steps_e : This is a print move, because we checked for X, Y, Z steps before.
*
* extruder_advance_K : There is an advance factor set.
*
* delta_mm[E_AXIS] > 0 : Extruder is running forward (e.g., for "Wipe while retracting" (Slic3r) or "Combing" (Cura) moves)
*/
block->use_advance_lead = block->steps_e
&& extruder_advance_K
&& delta_mm[E_AXIS] > 0;
if (block->use_advance_lead) {
block->e_D_ratio = (e - position_float[E_AXIS]) /
sqrt(sq(x - position_float[X_AXIS])
@ -1085,7 +1081,7 @@ Having the real displacement of the head, we can calculate the total movement le
#ifdef LIN_ADVANCE
if (block->use_advance_lead) {
block->advance_speed = ((F_CPU) * 0.125) / (extruder_advance_K * block->e_D_ratio * block->acceleration * axis_steps_per_unit[E_AXIS]);
block->advance_speed = (F_CPU / 8.0) / (extruder_advance_K * block->e_D_ratio * block->acceleration * axis_steps_per_unit[E_AXIS]);
#ifdef LA_DEBUG
if (extruder_advance_K * block->e_D_ratio * block->acceleration * 2 < block->nominal_speed * block->e_D_ratio)
SERIAL_ECHOLNPGM("More than 2 steps per eISR loop executed.");