input_shaper: Fixed C module compilation on older gnu90 compilers

For example, Raspbian GNU/Linux 8 (jessie) uses an old GCC version 4.9.2
which uses -std=gnu90 by default.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
Dmitry Butyugin 2020-07-07 20:46:45 +02:00 committed by KevinOConnor
parent cd8f250e84
commit 5dc0c8aac0
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ calc_position(struct move *m, int axis, double move_time
, struct shaper_pulse *pulses, int n) , struct shaper_pulse *pulses, int n)
{ {
double res = 0.; double res = 0.;
for (int i = 0; i < n; ++i) int i;
for (i = 0; i < n; ++i)
res += pulses[i].a * get_axis_position_across_moves( res += pulses[i].a * get_axis_position_across_moves(
m, axis, move_time + pulses[i].t); m, axis, move_time + pulses[i].t);
return res; return res;