Revert "dda.c: let's save 3 divisions."
delta_um can become very small, where maximum_feedrate_P is constant.
When moving this division out of the loop, the result can be wrong.
dda->total_steps becomes also very small with delta_um. So this will fit perfectly.
This reverts commit cd66feb8d1.
This commit is contained in:
parent
1e052a77a2
commit
e707c395f3
3
dda.c
3
dda.c
|
|
@ -324,12 +324,11 @@ void dda_create(DDA *dda, const TARGET *target) {
|
|||
c_limit = 0;
|
||||
for (i = X; i < AXIS_COUNT; i++) {
|
||||
c_limit_calc = (delta_um[i] * 2400L) /
|
||||
// dda->total_steps * (F_CPU / 40000) /
|
||||
dda->total_steps * (F_CPU / 40000) /
|
||||
pgm_read_dword(&maximum_feedrate_P[i]);
|
||||
if (c_limit_calc > c_limit)
|
||||
c_limit = c_limit_calc;
|
||||
}
|
||||
c_limit = c_limit / dda->total_steps * (F_CPU / 40000);
|
||||
|
||||
#ifdef ACCELERATION_REPRAP
|
||||
// c is initial step time in IOclk ticks
|
||||
|
|
|
|||
Loading…
Reference in New Issue