|
Stupidest Programming Mistakes
Alright everyone, let's have a collection of this seasons dumb programming mistakes, it'll be educational, and fun, and maybe I won't make as many dumb mistakes after seeing all the ones possible!
My gyro code was broken because I always checked to see if the output was greater than zero, and if so, set it to zero.....no wonder the robot always spun to the right...
Code:
if(GyroSample > 0)
GyroSample = 0;
Two days troubleshooting that one, thanks to Drew Shapiro from 417 for spotting it.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!
I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
|