|
EasyC OI Inputs?
What is up with how EasyC handles input from the OI? I was trying to reprogram our 2005 bot for drivers to practice, and I decided to use EasyC to get familiar with it and because our programming team was considering using it.
[edit] aha! EasyC doesn't yell at you if you are using a "char" instead of an "unsigned char" to store motor data, probably because WPILib bases its drive code on a -127 to 127 range instead of the usual 0-255. This means that sometimes "0" is the 'neutral' value and other times it's 127. The other functions from WPILib (the "drive" library, anyways) appeare to be based on a -127 to 127 scale. When I looked I couldn't find this in the documentation, so made an educated guess the wrong way.
Why does the "drive" library use a different metaphor than the rest of the program? I find this rather confusing. [/edit]
I wasn't able to figure out what was going on, so I just went back to MPLAB and reprogrammed the robot there. Tried and true, I suppose
Last edited by Greg Marra : 13-01-2007 at 20:37.
|