|
Re: Trouble with Autonomous
The other problem I see is your putting parentheses around your SPEED_TO_PWM macro. With them there, you have a similar rounding issue, and the 127/10 ends up being truncated to 12. If you leave the paretheses off but everything else as it is, the division by 10 won't happen until after all the multiplications are done and you'll end up with more like what you want.
|