Quote:
Originally Posted by BradAMiller
That's a little confusing. The Initialize routine actually waits until the robot has been turned on for a second (settling time for vibration), then it does a one second calibration where it computes the average non-moving value. So you shouldn't need to 1.2 second wait.
I'm not sure why adding it changes anything, but you can look at a pretty simple sample program here that does work:
http://users.wpi.edu/~bamiller/WPILib/Samples.html
Please let us know if you find a bug in something that is causing your problem.
|
We are having a similar problem. We are using WPILIB with Eclipse. We are also using the KOP gyro's and gear tooth sensors. We tested them all individually with WPILIB and they worked great. When we started integrating the different features together we started getting very strange and intermittent results. For example, after reset, we would get just a single value that would never change as we rotated the yaw rate sensor. By just moving two lines of code down a couple lines (code that registered interrupts for the IR sensor was moved from the end of Initialize() to the start of Autonomous()), the gyro started working again. We started back from scratch and started adding functionality. Now the gear tooth sensors don't work at all. That code related to the gear tooth sensors is identical to what it used to be when it worked. It made us think of the memory corruption back in 2006 with the "8.2/8.3 battery voltage bug". Is there anything we need to do for that bug when using WPILib or do you have any other suggestions.