|
Re: Stupidest Programming Mistakes
if(joyin - pwmout > rate)
pwmout = pwmout + rate;
joyin - pwmout could be negative but they were all unsigned variables so it never looked at nagatives. So for example it would still execute when (-10 > 5)
Took 2 hours to realize that!
|