Self Calibrating Joysticks
I'm honestly not sure if anyone's ever tried this, or if anyone else even thinks it could be a good idea, but I just want some feedback on it in general.
Basically, this all started with a PS2...
My girlfriend was playing GTAIII on her PS2, but when she turned it on, she was running in circles. I told her immediately it was because she had left the control upside down. She asked me why anyone would want the sticks to center when you turned on the system. I wasn't totally sure, but I told her it was problaby to make sure they always started in the middle. She said, and I quote, "too bad our bot doesn't do that". And so began an idea...
The attached code is what I came up with. Ignore the "factoring" part, as that was something that my team is using to test out a new drive system. Any thoughts on it would be greatly appreciated.
I know the obvious downfall is the same as with the PS2 controller, if someone pushes the stick forward, and turns on the bot, it will jump. I added in a way to "recalibrate" the sticks, but that would still be after the bot initially runs amok and crashes into someone's kneecaps.
__________________
Justin Lambert
02-03: Programmer Team #151
|