Why did you use integer math in control_system.c and floating point in drive_control.c. All assignments are being dropped into int variables, so multiplying by 1.30 is just going to put extra strain on the processor to just get the same answer.
Try
Code:
targetticks = (percentage * 26) /20;
Yay for math by multiples of 2.
Another general question for all of the PIC gurus out there.. which would be more efficient, if there is any difference?
Code:
targetticks = (percentage * 26) /20;
or...
targetticks = (percentage * 13) /10;