standard servo: store accumulator in scaled nsecs
The integral accumulator of the PI servo is now a 64bit integer. The stored values are bit shifted by 10, so we have a finer granularity on the control. With the previous implementation the integral part stopped working when ofm was under the value of OPTS(ppi)->ai. This problem has been solved with this changes. I had to use __div64_32() from lib/div64.c, because dividing for a long long is not allowed in arch-wrpc (it takes too much RAM).
Showing
Please
register
or
sign in
to comment